Hi Chen, kernel test robot noticed the following build warnings: [auto build test WARNING on next-20240911] url: https://github.com/intel-lab-lkp/linux/commits/Chen-Ridong/cgroup-freezer-Reduce-redundant-traversal-for-cgroup_freeze/20240912-093141 base: next-20240911 patch link: https://lore.kernel.org/r/20240912012037.1324165-4-chenridong%40huawei.com patch subject: [PATCH v2 -next 3/3] cgroup/freezer: Reduce redundant propagation for cgroup_propagate_frozen config: i386-defconfig (https://download.01.org/0day-ci/archive/20240915/202409150216.INlNatES-lkp@xxxxxxxxx/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240915/202409150216.INlNatES-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202409150216.INlNatES-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> kernel/cgroup/freezer.c:46:12: warning: explicitly assigning value of variable of type 'struct cgroup *' to itself [-Wself-assign] 46 | for (cgrp = cgrp; cgrp; cgrp = cgroup_parent(cgrp)) { | ~~~~ ^ ~~~~ 1 warning generated. vim +46 kernel/cgroup/freezer.c 32 33 /* 34 * Propagate the cgroup frozen state upwards by the cgroup tree. 35 */ 36 static void cgroup_propagate_frozen(struct cgroup *cgrp, bool frozen) 37 { 38 int deta; 39 struct cgroup *parent; 40 /* 41 * If the new state is frozen, some freezing ancestor cgroups may change 42 * their state too, depending on if all their descendants are frozen. 43 * 44 * Otherwise, all ancestor cgroups are forced into the non-frozen state. 45 */ > 46 for (cgrp = cgrp; cgrp; cgrp = cgroup_parent(cgrp)) { 47 if (frozen) { 48 /* If freezer is not set, or cgrp has descendants 49 * that are not frozen, cgrp can't be frozen 50 */ 51 if (!test_bit(CGRP_FREEZE, &cgrp->flags) || 52 (cgrp->freezer.nr_frozen_descendants != 53 cgrp->nr_descendants)) 54 break; 55 deta = cgrp->freezer.nr_frozen_descendants + 1; 56 } else { 57 deta = -(cgrp->freezer.nr_frozen_descendants + 1); 58 } 59 60 /* No change, stop propagate */ 61 if (!cgroup_update_frozen_flag(cgrp, frozen)) 62 break; 63 64 parent = cgroup_parent(cgrp); 65 parent->freezer.nr_frozen_descendants += deta; 66 } 67 } 68 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki