Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: SeongJae Park <sj@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels
Date: Mon, 8 Sep 2025 20:35:07 +0800	[thread overview]
Message-ID: <202509082042.24Nb5PCp-lkp@intel.com> (raw)

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

             reply	other threads:[~2025-09-08 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08 12:35 kernel test robot [this message]
2025-09-09  1:23 ` [sj:damon/next 118/128] mm/damon/tests/core-kunit.h:453:2: warning: unannotated fall-through between switch labels SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202509082042.24Nb5PCp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox