Skip to contentSkip to conversation

linux-next: build warning after merge of the akpm-current tree

DISCUSSION Stephen Rothwell 3 participants 8 messages Jul 31, 2019 – Aug 1, 2019 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~

Introduced by commit

c48a2f5ce935 ("mm/memcontrol.c: fix use after free in mem_cgroup_iter()")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~

Hi Stephen,

Thanks for the telling me this. Sorry for the build warning. Should I send patch v5 to the mailing list to fix this?

Miles

Quoted 4 lines

Introduced by commit

c48a2f5ce935 ("mm/memcontrol.c: fix use after free in mem_cgroup_iter()")

#2 lore raw

Hi Miles,

Quoted 12 lines · On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <[email protected]> wrote:
Quoted 9 lines · Stephen Rothwell

After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~
Quoted 4 lines

Hi Stephen,

Thanks for the telling me this. Sorry for the build warning. Should I send patch v5 to the mailing list to fix this?

You might as well (cc'ing Andrew, of course).

I would suggest finishing that loop like this:

		memcg = parent_mem_cgroup(memcg);
	} while (memcg);

rather than adding a set of parentheses.

Signature · 2 lines
Cheers,
Stephen Rothwell
#3 lore raw
Quoted 20 lines · Stephen Rothwell

Hi Miles,

Quoted 12 lines · On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <[email protected]> wrote:
Quoted 9 lines · Stephen Rothwell

After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~
Quoted 4 lines

Hi Stephen,

Thanks for the telling me this. Sorry for the build warning. Should I send patch v5 to the mailing list to fix this?

Quoted 8 lines

You might as well (cc'ing Andrew, of course).

I would suggest finishing that loop like this:

		memcg = parent_mem_cgroup(memcg);
	} while (memcg);

rather than adding a set of parentheses.

Qian has already posted a patch http://lkml.kernel.org/r/[email protected]

Signature · 2 lines
Michal Hocko
SUSE Labs
#4 lore raw
Quoted 21 lines · Michal Hocko
Quoted 20 lines · Stephen Rothwell

Hi Miles,

Quoted 16 lines · On Wed, 31 Jul 2019 14:28:04 +0800 Miles Chen <[email protected]> wrote:
Quoted 9 lines · Stephen Rothwell

After merging the akpm-current tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:

mm/memcontrol.c: In function 'invalidate_reclaim_iterators':
mm/memcontrol.c:1160:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

  } while (memcg = parent_mem_cgroup(memcg));
           ^~~~~

Hi Stephen,

Thanks for the telling me this. Sorry for the build warning. Should I send patch v5 to the mailing list to fix this?

Quoted 8 lines
Quoted 8 lines

You might as well (cc'ing Andrew, of course).

I would suggest finishing that loop like this:

		memcg = parent_mem_cgroup(memcg);
	} while (memcg);

rather than adding a set of parentheses.

thanks for the advise

Quoted 2 lines

Qian has already posted a patch http://lkml.kernel.org/r/[email protected]

Thanks Qian's quick fix.

It's the first time that I receive a build warning after the patch has been merged to -mm tree. The build warning had been fixed by Qian, should I send another change for this?

#5 lore raw

On Thu 01-08-19 14:30:03, Miles Chen wrote:
[...]

Quoted 3 lines

It's the first time that I receive a build warning after the patch has been merged to -mm tree. The build warning had been fixed by Qian, should I send another change for this?

No need. Andrew has already picked up the fix for mmotm tree and it should show up in linux-next soon.

Thanks!

Signature · 2 lines
Michal Hocko
SUSE Labs
#6 lore raw
In reply to Miles Chen

Hi Miles,

Quoted 4 lines · On Thu, 1 Aug 2019 14:30:03 +0800 Miles Chen <[email protected]> wrote:

It's the first time that I receive a build warning after the patch has been merged to -mm tree. The build warning had been fixed by Qian, should I send another change for this?

No, that will do.

Signature · 2 lines
Cheers,
Stephen Rothwell
#7 lore raw
Quoted 9 lines · Stephen Rothwell

Hi Miles,

Quoted 4 lines · On Thu, 1 Aug 2019 14:30:03 +0800 Miles Chen <[email protected]> wrote:

It's the first time that I receive a build warning after the patch has been merged to -mm tree. The build warning had been fixed by Qian, should I send another change for this?

No, that will do.

got it. thanks