All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yury Norov <yury.norov@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Brian Norris <briannorris@chromium.org>,
	Kees Cook <kees@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>
Subject: include/asm-generic/percpu.h:21:44: warning: array subscript 32 is above array bounds of 'long unsigned int[32]'
Date: Mon, 22 Sep 2025 21:32:48 +0800	[thread overview]
Message-ID: <202509222148.aujDHbuM-lkp@intel.com> (raw)

Hi Yury,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   07e27ad16399afcd693be20211b0dfae63e0615f
commit: fda1dd3c54ef3c4200c2e77634a91610da973950 find: Switch from inline to __always_inline
date:   1 year, 1 month ago
config: riscv-randconfig-r111-20250922 (https://download.01.org/0day-ci/archive/20250922/202509222148.aujDHbuM-lkp@intel.com/config)
compiler: riscv32-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250922/202509222148.aujDHbuM-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/202509222148.aujDHbuM-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/compiler_types.h:174,
                    from <command-line>:
   drivers/base/test/test_async_driver_probe.c: In function 'test_async_probe_init':
>> include/asm-generic/percpu.h:21:44: warning: array subscript 32 is above array bounds of 'long unsigned int[32]' [-Warray-bounds]
    #define per_cpu_offset(x) (__per_cpu_offset[x])
   include/linux/compiler-gcc.h:35:26: note: in definition of macro 'RELOC_HIDE'
     (typeof(ptr)) (__ptr + (off));     \
                             ^~~
   include/linux/percpu-defs.h:236:2: note: in expansion of macro 'SHIFT_PERCPU_PTR'
     SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)));   \
     ^~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:236:26: note: in expansion of macro 'per_cpu_offset'
     SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu)));   \
                             ^~~~~~~~~~~~~~
   include/linux/percpu-defs.h:269:29: note: in expansion of macro 'per_cpu_ptr'
    #define per_cpu(var, cpu) (*per_cpu_ptr(&(var), cpu))
                                ^~~~~~~~~~~
   include/linux/topology.h:96:9: note: in expansion of macro 'per_cpu'
     return per_cpu(numa_node, cpu);
            ^~~~~~~


vim +21 include/asm-generic/percpu.h

^1da177e4c3f41 Linus Torvalds 2005-04-16  20  
a875a69f8b00a3 Ingo Molnar    2006-07-03 @21  #define per_cpu_offset(x) (__per_cpu_offset[x])
acdac87202a408 travis@sgi.com 2008-01-30  22  #endif
acdac87202a408 travis@sgi.com 2008-01-30  23  

:::::: The code at line 21 was first introduced by commit
:::::: a875a69f8b00a38b4f40d9632a4fc71a159f0e0d [PATCH] lockdep: add per_cpu_offset()

:::::: TO: Ingo Molnar <mingo@elte.hu>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>

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

                 reply	other threads:[~2025-09-22 13:33 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=202509222148.aujDHbuM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=briannorris@chromium.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=yury.norov@gmail.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.