* [linux-next:master 9303/13299] arch/m68k/include/asm/raw_io.h:20:18: warning: array subscript 0 is outside array bounds of 'const volatile u8[0]' {aka 'const volatile unsigned char[]'}
@ 2023-10-18 23:09 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-10-18 23:09 UTC (permalink / raw)
To: Arnd Bergmann
Cc: oe-kbuild-all, Linux Memory Management List, Geert Uytterhoeven
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 2dac75696c6da3c848daa118a729827541c89d33
commit: c7db3832ff19a9a1116c1b3d435c9db165a2f2f8 [9303/13299] m68k: io: Mark mmio read addresses as const
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231019/202310190741.mbPtQRpD-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231019/202310190741.mbPtQRpD-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/202310190741.mbPtQRpD-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/m68k/include/asm/io_mm.h:25,
from arch/m68k/include/asm/io.h:8,
from include/linux/io.h:13,
from drivers/hwmon/pc87427.c:31:
drivers/hwmon/pc87427.c: In function 'pc87427_readall_pwm':
>> arch/m68k/include/asm/raw_io.h:20:18: warning: array subscript 0 is outside array bounds of 'const volatile u8[0]' {aka 'const volatile unsigned char[]'} [-Warray-bounds=]
20 | ({ u8 __v = (*(__force const volatile u8 *) (unsigned long)(addr)); __v; })
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/io_mm.h:345:62: note: in expansion of macro 'in_8'
345 | #define inb(port) ((port) < 1024 ? isa_rom_inb(port) : in_8(port))
| ^~~~
drivers/hwmon/pc87427.c:244:32: note: in expansion of macro 'inb'
244 | data->pwm_enable[nr] = inb(iobase + PC87427_REG_PWM_ENABLE);
| ^~~
cc1: note: source object is likely at address zero
vim +20 arch/m68k/include/asm/raw_io.h
15
16 /* ++roman: The assignments to temp. vars avoid that gcc sometimes generates
17 * two accesses to memory, which may be undesirable for some devices.
18 */
19 #define in_8(addr) \
> 20 ({ u8 __v = (*(__force const volatile u8 *) (unsigned long)(addr)); __v; })
21 #define in_be16(addr) \
22 ({ u16 __v = (*(__force const volatile u16 *) (unsigned long)(addr)); __v; })
23 #define in_be32(addr) \
24 ({ u32 __v = (*(__force const volatile u32 *) (unsigned long)(addr)); __v; })
25 #define in_le16(addr) \
26 ({ u16 __v = le16_to_cpu(*(__force const volatile __le16 *) (unsigned long)(addr)); __v; })
27 #define in_le32(addr) \
28 ({ u32 __v = le32_to_cpu(*(__force const volatile __le32 *) (unsigned long)(addr)); __v; })
29
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-18 23:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 23:09 [linux-next:master 9303/13299] arch/m68k/include/asm/raw_io.h:20:18: warning: array subscript 0 is outside array bounds of 'const volatile u8[0]' {aka 'const volatile unsigned char[]'} kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox