Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels
@ 2025-09-08 12:35 kernel test robot
  2025-09-09  1:23 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-09-08 12:35 UTC (permalink / raw)
  To: SeongJae Park; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head:   387bf1dec467127e728b28dc7624723d7df2813c
commit: d53726dd7bd14e94f2c46a842c8c45c2231090b7 [118/128] mm/damon/tests/core-kunit: split out damos_test_commit_quota_goal()
config: i386-buildonly-randconfig-006-20250908 (https://download.01.org/0day-ci/archive/20250908/202509082042.24Nb5PCp-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250908/202509082042.24Nb5PCp-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509082042.24Nb5PCp-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from mm/damon/core.c:3156:
>> mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
     453 |         default:
         |         ^
   mm/damon/tests/core-kunit.h:453:2: note: insert 'break;' to avoid fall-through
     453 |         default:
         |         ^
         |         break; 
   1 warning generated.


vim +453 mm/damon/tests/core-kunit.h

   437	
   438	static void damos_test_commit_quota_goal_ensure_committed(struct kunit *test,
   439			struct damos_quota_goal *dst, struct damos_quota_goal *src,
   440			u64 last_psi_total)
   441	{
   442		struct damos_quota_goal dst_cp, src_cp;
   443	
   444		KUNIT_EXPECT_EQ(test, dst->metric, src->metric);
   445		KUNIT_EXPECT_EQ(test, dst->target_value, src->target_value);
   446		KUNIT_EXPECT_EQ(test, dst->current_value, src->current_value);
   447		/* last_psi_total is not updated */
   448		KUNIT_EXPECT_EQ(test, dst->last_psi_total, last_psi_total);
   449		switch (dst->metric) {
   450		case DAMOS_QUOTA_NODE_MEM_USED_BP:
   451		case DAMOS_QUOTA_NODE_MEM_FREE_BP:
   452			KUNIT_EXPECT_EQ(test, dst->nid, src->nid);
 > 453		default:
   454			break;
   455		}
   456	
   457		/* further check entire bits */
   458		memcpy(&dst_cp, dst, sizeof(dst_cp));
   459		memcpy(&src_cp, src, sizeof(src_cp));
   460		dst_cp.list = src_cp.list;
   461		dst_cp.last_psi_total = src_cp.last_psi_total;
   462		dst_cp.nid = src_cp.nid;
   463		dst_cp.memcg_id = src_cp.memcg_id;
   464	
   465		KUNIT_EXPECT_EQ(test, memcmp(&dst_cp, &src_cp, sizeof(dst_cp)), 0);
   466	}
   467	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels
  2025-09-08 12:35 [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels kernel test robot
@ 2025-09-09  1:23 ` SeongJae Park
  0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2025-09-09  1:23 UTC (permalink / raw)
  To: kernel test robot; +Cc: SeongJae Park, llvm, oe-kbuild-all, damon

On Mon, 8 Sep 2025 20:35:07 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
> head:   387bf1dec467127e728b28dc7624723d7df2813c
> commit: d53726dd7bd14e94f2c46a842c8c45c2231090b7 [118/128] mm/damon/tests/core-kunit: split out damos_test_commit_quota_goal()
> config: i386-buildonly-randconfig-006-20250908 (https://download.01.org/0day-ci/archive/20250908/202509082042.24Nb5PCp-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250908/202509082042.24Nb5PCp-lkp@intel.com/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@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202509082042.24Nb5PCp-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from mm/damon/core.c:3156:
> >> mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
>      453 |         default:
>          |         ^
>    mm/damon/tests/core-kunit.h:453:2: note: insert 'break;' to avoid fall-through
>      453 |         default:
>          |         ^
>          |         break; 
>    1 warning generated.

Thank you for reporting this!  I just pushed a fix to my tree:
http://git.kernel.org/sj/c/922891e5eea9872058e013249d9aeab0eb6471d5


Thanks,
SJ

[...]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-09  1:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 12:35 [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels kernel test robot
2025-09-09  1:23 ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox