From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: "Barry Song (Xiaomi)" <baohua@kernel.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, Dev Jain <dev.jain@arm.com>,
Wen Jiang <jiangwen6@xiaomi.com>, Guo Ren <guoren@kernel.org>,
linux-csky@vger.kernel.org
Subject: Re: [akpm-mm:mm-new 59/142] mm/vmalloc.c:3590:23: warning: unused variable 'start'
Date: Mon, 29 Jun 2026 17:19:09 -0700 [thread overview]
Message-ID: <20260629171909.1d6e96dd15a80b8f463bb68a@linux-foundation.org> (raw)
In-Reply-To: <202606291606.9h8aGniQ-lkp@intel.com>
On Mon, 29 Jun 2026 16:58:34 +0800 kernel test robot <lkp@intel.com> wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head: 88cefc306c43b58d9bb65c9e96e284306710d961
> commit: 80c453511b6ee1af0e4db83c3db0020215c4eaf0 [59/142] mm/vmalloc: map contiguous pages in batches for vmap() if possible
> config: csky-allnoconfig (https://download.01.org/0day-ci/archive/20260629/202606291606.9h8aGniQ-lkp@intel.com/config)
> compiler: csky-linux-gcc (GCC) 16.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260629/202606291606.9h8aGniQ-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/202606291606.9h8aGniQ-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> mm/vmalloc.c: In function 'vmap_batched':
> >> mm/vmalloc.c:3590:23: warning: unused variable 'start' [-Wunused-variable]
> 3590 | unsigned long start = addr, map_addr = addr;
> | ^~~~~
Sigh.
unsigned long start = addr, map_addr = addr;
...
flush_cache_vmap(start, end);
See, this is our punishment for writing kernel code in CPP rather than
in C.
I'll queue (and test) the below. It should be OK -
arch/csky/abiv1/inc/abi/cacheflush.h directly includes asm/cache.h
which declares cache_wbinv_all().
From: Andrew Morton <akpm@linux-foundation.org>
Subject: csky: implement flush_cache_vmap() in C
Date: Mon Jun 29 05:07:51 PM PDT 2026
To avoid getting an unused-var warning from
unsigned long start = something;
...
flush_cache_vmap(start, ...);
Cc: Guo Ren <guoren@kernel.org>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: "Barry Song (Xiaomi)" <baohua@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Wen Jiang <jiangwen6@xiaomi.com>
Cc: Wen Jiang <jiangwenxiaomi@gmail.com>
Cc: Will Deacon <will@kernel.org>
Cc: Xueyuan Chen <xueyuan.chen21@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/csky/abiv1/inc/abi/cacheflush.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/arch/csky/abiv1/inc/abi/cacheflush.h~csky-implement-flush_cache_vmap-in-c
+++ a/arch/csky/abiv1/inc/abi/cacheflush.h
@@ -42,7 +42,12 @@ static inline void flush_anon_page(struc
* Use cache_wbinv_all() here and need to be improved in future.
*/
extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
-#define flush_cache_vmap(start, end) cache_wbinv_all()
+
+static inline void flush_cache_vmap(unsigned long start, unsigned long end)
+{
+ cache_wbinv_all();
+}
+
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) cache_wbinv_all()
_
next parent reply other threads:[~2026-06-30 0:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202606291606.9h8aGniQ-lkp@intel.com>
2026-06-30 0:19 ` Andrew Morton [this message]
2026-06-30 3:06 ` [akpm-mm:mm-new 59/142] mm/vmalloc.c:3590:23: warning: unused variable 'start' Guo Ren
2026-06-30 10:57 ` Barry Song
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=20260629171909.1d6e96dd15a80b8f463bb68a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=baohua@kernel.org \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=guoren@kernel.org \
--cc=jiangwen6@xiaomi.com \
--cc=linux-csky@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=mm-commits@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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