From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Christoph Lameter <cl@linux-foundation.org>,
oe-kbuild-all@lists.linux.dev,
David Hildenbrand <david@kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
mm-commits@vger.kernel.org, David Rientjes <rientjes@google.com>
Subject: Re: [akpm-mm:mm-unstable 327/327] arch/arm64/include/asm/percpu.h:261:1: sparse: sparse: cast truncates bits from constant value (ffffffffffffd8f0 becomes f0)
Date: Sun, 22 Nov 2026 19:48:25 -0800 [thread overview]
Message-ID: <20261122194825.2541c7389c2f958ef3d07fbc@linux-foundation.org> (raw)
In-Reply-To: <20261121133112.48w1QOqw-lkp@intel.com>
On Sat, 21 Nov 2026 13:34:45 +0100 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable
> head: 7d1a16abe4cc5dccd21e3d6262e44433a5885d27
> commit: 7d1a16abe4cc5dccd21e3d6262e44433a5885d27 [327/327] mm: vmstat_kunit: add synthetic benchmark for mm stats
> config: arm64-randconfig-r2305-20261121 (https://download.01.org/0day-ci/archive/20261121/20261121133112.48w1QOqw-lkp@intel.com/config)
> compiler: aarch64-linux-gcc (GCC) 15.3.0
> sparse: v0.6.5-rc1-21-g84ec0658
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261121/20261121133112.48w1QOqw-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/20261121133112.48w1QOqw-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> mm/tests/vmstat_kunit.c: note: in included file (through include/linux/irqflags.h, include/linux/spinlock.h, include/linux/kref.h, include/kunit/test.h):
> >> arch/arm64/include/asm/percpu.h:261:1: sparse: sparse: cast truncates bits from constant value (ffffffffffffd8f0 becomes f0)
Thanks. sparse is being a bit silly here. Using a variable instead of
a constant silences it.
From: Andrew Morton <akpm@linux-foundation.org>
Subject: mm/vmstat_kunit: avoid sparse warning in vm event cleanup
Date: Sun, 22 Nov 2026 18:51:40 -0800
Sparse warns about -TEST_COUNT in an unreachable 1-byte arm64 per-CPU
case; the actual counter is 8 bytes. Pass the completed loop count
instead to silence the warning, with no behavior change.
Link: https://lore.kernel.org/r/21183f5b-2697-cbe6-6370-dbd27c5e2b60@google.com
Fixes: 7d1a16abe4cc ("mm: vmstat_kunit: add synthetic benchmark for mm stats")
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/20261121133112.48w1QOqw-lkp@intel.com/
Cc: Christoph Lameter <cl@gentwo.org>
Cc: David Rientjes <rientjes@google.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Sarthak Sharma <sarthak.sharma@arm.com>
mm/tests/vmstat_kunit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/tests/vmstat_kunit.c~mm-vmstat_kunit-add-synthetic-benchmark-for-mm-stats-fix
+++ a/mm/tests/vmstat_kunit.c
@@ -107,7 +107,7 @@ static void vmstat_test_interleaved_zone
/*
* Test 3: count_vm_event() benchmark.
- * Restores counter balance with count_vm_events(item, -TEST_COUNT).
+ * Restores counter balance after measurement.
*/
static void vmstat_test_count_vm_event(struct kunit *test)
{
@@ -124,7 +124,7 @@ static void vmstat_test_count_vm_event(s
time2 = get_cycles();
/* Restore balance */
- count_vm_events(SLABS_SCANNED, -TEST_COUNT);
+ count_vm_events(SLABS_SCANNED, -(long)i);
time = time2 - time1;
avg_cycles = div_u64(time, TEST_COUNT);
_
next prev parent reply other threads:[~2026-11-23 3:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 12:34 [akpm-mm:mm-unstable 327/327] arch/arm64/include/asm/percpu.h:261:1: sparse: sparse: cast truncates bits from constant value (ffffffffffffd8f0 becomes f0) kernel test robot
2026-11-23 3:48 ` Andrew Morton [this message]
2026-11-23 17:04 ` David Rientjes
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=20261122194825.2541c7389c2f958ef3d07fbc@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=david@kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mm-commits@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rientjes@google.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.