From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, Yang Yingliang <yangyingliang@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:openEuler-1.0-LTS 1782/1782] mm/vmalloc.c:217:23: warning: variable 'start' set but not used
Date: Tue, 16 Sep 2025 00:08:55 +0800 [thread overview]
Message-ID: <202509160016.RjCI0LQf-lkp@intel.com> (raw)
Hi Nicholas,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS
head: 8975e9a49fdd2f6402cc5fe68bc08d3c2b7a35a5
commit: 3eb01faed2ebb254019a3bb72ce3bdf4d0a9be74 [1782/1782] mm/vmalloc: add vmap_range_noflush variant
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20250916/202509160016.RjCI0LQf-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250916/202509160016.RjCI0LQf-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/202509160016.RjCI0LQf-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/vmalloc.c: In function 'vmap_range_noflush':
>> mm/vmalloc.c:217:23: warning: variable 'start' set but not used [-Wunused-but-set-variable]
217 | unsigned long start;
| ^~~~~
mm/vmalloc.c: At top level:
mm/vmalloc.c:1417:6: warning: no previous prototype for 'set_iounmap_nonlazy' [-Wmissing-prototypes]
1417 | void set_iounmap_nonlazy(void)
| ^~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/include/asm/atomic.h:36,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/arm64/include/asm/bitops.h:37,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:51,
from include/linux/vmalloc.h:5,
from mm/vmalloc.c:11:
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'spin_lock' at include/linux/spinlock.h:329:2,
inlined from 'find_vmap_area' at mm/vmalloc.c:1519:2:
arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=]
259 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE'
283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory")
| ^~~~~~~~~~~~~~
In file included from include/linux/spinlock.h:82:
mm/vmalloc.c: In function 'find_vmap_area':
mm/vmalloc.c:557:24: note: object 'vmap_area_lock' of size 4
557 | static DEFINE_SPINLOCK(vmap_area_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:81:44: note: in definition of macro 'DEFINE_SPINLOCK'
81 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'spin_lock' at include/linux/spinlock.h:329:2,
inlined from 'find_vmap_area' at mm/vmalloc.c:1519:2:
arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=]
259 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE'
283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory")
| ^~~~~~~~~~~~~~
mm/vmalloc.c: In function 'find_vmap_area':
mm/vmalloc.c:557:24: note: object 'vmap_area_lock' of size 4
557 | static DEFINE_SPINLOCK(vmap_area_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:81:44: note: in definition of macro 'DEFINE_SPINLOCK'
81 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'spin_lock' at include/linux/spinlock.h:329:2,
inlined from 'setup_vmalloc_vm' at mm/vmalloc.c:2111:2:
arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=]
259 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE'
283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory")
| ^~~~~~~~~~~~~~
mm/vmalloc.c: In function 'setup_vmalloc_vm':
mm/vmalloc.c:557:24: note: object 'vmap_area_lock' of size 4
557 | static DEFINE_SPINLOCK(vmap_area_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:81:44: note: in definition of macro 'DEFINE_SPINLOCK'
81 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
inlined from 'queued_spin_lock' at include/asm-generic/qspinlock.h:85:8,
inlined from 'do_raw_spin_lock' at include/linux/spinlock.h:180:2,
inlined from '__raw_spin_lock' at include/linux/spinlock_api_smp.h:143:2,
inlined from 'spin_lock' at include/linux/spinlock.h:329:2,
inlined from 'setup_vmalloc_vm' at mm/vmalloc.c:2111:2:
arch/arm64/include/asm/atomic_ll_sc.h:259:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'spinlock_t[1]' {aka 'struct spinlock[1]'} [-Warray-bounds=]
259 | asm volatile( \
| ^~~
arch/arm64/include/asm/atomic_ll_sc.h:283:1: note: in expansion of macro '__CMPXCHG_CASE'
283 | __CMPXCHG_CASE(w, , acq_4, , a, , "memory")
| ^~~~~~~~~~~~~~
mm/vmalloc.c: In function 'setup_vmalloc_vm':
mm/vmalloc.c:557:24: note: object 'vmap_area_lock' of size 4
557 | static DEFINE_SPINLOCK(vmap_area_lock);
| ^~~~~~~~~~~~~~
include/linux/spinlock_types.h:81:44: note: in definition of macro 'DEFINE_SPINLOCK'
81 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
| ^
In function '__cmpxchg_case_acq_4',
inlined from '__cmpxchg_acq' at arch/arm64/include/asm/cmpxchg.h:141:1,
vim +/start +217 mm/vmalloc.c
004cface9c1c0b Nicholas Piggin 2021-10-29 211
3eb01faed2ebb2 Nicholas Piggin 2021-10-29 212 static int vmap_range_noflush(unsigned long addr, unsigned long end,
004cface9c1c0b Nicholas Piggin 2021-10-29 213 phys_addr_t phys_addr, pgprot_t prot,
004cface9c1c0b Nicholas Piggin 2021-10-29 214 unsigned int max_page_shift)
004cface9c1c0b Nicholas Piggin 2021-10-29 215 {
004cface9c1c0b Nicholas Piggin 2021-10-29 216 pgd_t *pgd;
004cface9c1c0b Nicholas Piggin 2021-10-29 @217 unsigned long start;
004cface9c1c0b Nicholas Piggin 2021-10-29 218 unsigned long next;
004cface9c1c0b Nicholas Piggin 2021-10-29 219 int err;
004cface9c1c0b Nicholas Piggin 2021-10-29 220
004cface9c1c0b Nicholas Piggin 2021-10-29 221 might_sleep();
004cface9c1c0b Nicholas Piggin 2021-10-29 222 BUG_ON(addr >= end);
004cface9c1c0b Nicholas Piggin 2021-10-29 223
004cface9c1c0b Nicholas Piggin 2021-10-29 224 start = addr;
004cface9c1c0b Nicholas Piggin 2021-10-29 225 pgd = pgd_offset_k(addr);
004cface9c1c0b Nicholas Piggin 2021-10-29 226 do {
004cface9c1c0b Nicholas Piggin 2021-10-29 227 next = pgd_addr_end(addr, end);
004cface9c1c0b Nicholas Piggin 2021-10-29 228 err = vmap_p4d_range(pgd, addr, next, phys_addr, prot, max_page_shift);
004cface9c1c0b Nicholas Piggin 2021-10-29 229 if (err)
004cface9c1c0b Nicholas Piggin 2021-10-29 230 break;
004cface9c1c0b Nicholas Piggin 2021-10-29 231 } while (pgd++, phys_addr += (next - addr), addr = next, addr != end);
004cface9c1c0b Nicholas Piggin 2021-10-29 232
3eb01faed2ebb2 Nicholas Piggin 2021-10-29 233 return err;
3eb01faed2ebb2 Nicholas Piggin 2021-10-29 234 }
3eb01faed2ebb2 Nicholas Piggin 2021-10-29 235
:::::: The code at line 217 was first introduced by commit
:::::: 004cface9c1c0b6351473934a4ce452193e05b07 mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c
:::::: TO: Nicholas Piggin <npiggin@gmail.com>
:::::: CC: Yang Yingliang <yangyingliang@huawei.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-09-15 16:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202509160016.RjCI0LQf-lkp@intel.com \
--to=lkp@intel.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yangyingliang@huawei.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.