Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470679 > unrolled thread
| Started by | Will Deacon <will.deacon@arm.com> |
|---|---|
| First post | 2016-08-26 14:40 +0200 |
| Last post | 2016-08-27 10:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v7 03/14] arm64/numa: add nid check for memory block Will Deacon <will.deacon@arm.com> - 2016-08-26 14:40 +0200
Re: [PATCH v7 03/14] arm64/numa: add nid check for memory block "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-08-27 10:10 +0200
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2016-08-26 14:40 +0200 |
| Subject | Re: [PATCH v7 03/14] arm64/numa: add nid check for memory block |
| Message-ID | <saoAp-6Vm-15@gated-at.bofh.it> |
On Wed, Aug 24, 2016 at 03:44:42PM +0800, Zhen Lei wrote:
> Use the same tactic to cpu and numa-distance nodes.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
> ---
> drivers/of/of_numa.c | 5 +++++
> 1 file changed, 5 insertions(+)
The subject has arm64/numa, but this is clearly core OF code and
requires an ack from Rob.
The commit message also doesn't make much sense to me.
> diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
> index 7b3fbdc..afaeb9c 100644
> --- a/drivers/of/of_numa.c
> +++ b/drivers/of/of_numa.c
> @@ -75,6 +75,11 @@ static int __init of_numa_parse_memory_nodes(void)
> */
> continue;
>
> + if (nid >= MAX_NUMNODES) {
> + pr_warn("NUMA: Node id %u exceeds maximum value\n", nid);
> + return -EINVAL;
> + }
Do you really want to return from the function here? Shouldn't we at least
of_node_put(np), i.e. by using a break; ?
Will
[toc] | [next] | [standalone]
| From | "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> |
|---|---|
| Date | 2016-08-27 10:10 +0200 |
| Message-ID | <saGQF-23P-3@gated-at.bofh.it> |
| In reply to | #1470679 |
On 2016/8/26 20:39, Will Deacon wrote:
> On Wed, Aug 24, 2016 at 03:44:42PM +0800, Zhen Lei wrote:
>> Use the same tactic to cpu and numa-distance nodes.
>>
>> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
>> ---
>> drivers/of/of_numa.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>
> The subject has arm64/numa, but this is clearly core OF code and
I originally added below check in arch/arm64/mm/numa.c, until Hanjun Guo
told me that it should move into drivers/of/of_numa.c
I forgot updating this.
> requires an ack from Rob.
>
> The commit message also doesn't make much sense to me.
>
>> diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c
>> index 7b3fbdc..afaeb9c 100644
>> --- a/drivers/of/of_numa.c
>> +++ b/drivers/of/of_numa.c
>> @@ -75,6 +75,11 @@ static int __init of_numa_parse_memory_nodes(void)
>> */
>> continue;
>>
>> + if (nid >= MAX_NUMNODES) {
>> + pr_warn("NUMA: Node id %u exceeds maximum value\n", nid);
>> + return -EINVAL;
>> + }
>
> Do you really want to return from the function here? Shouldn't we at least
> of_node_put(np), i.e. by using a break; ?
Thanks for pointing out this mistake. I will change to "r = -EINVAL" in the next version.
>
> Will
>
> .
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web