arch/m68k/sun3/sun3ints.c:33:13: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)

From: kernel test robot
Date: Sat Sep 14 2024 - 21:06:34 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0babf683783ddca06551537c6781e413cfe8d27b
commit: 72e70a0e7ac7c422843eb8bbf192e820e9ccd24d m68k: sun3: Change led_pattern[] to unsigned char
date: 12 months ago
config: m68k-randconfig-r131-20240914 (https://download.01.org/0day-ci/archive/20240915/202409150822.m4wt3d6X-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20240915/202409150822.m4wt3d6X-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409150822.m4wt3d6X-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> arch/m68k/sun3/sun3ints.c:33:13: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)

vim +33 arch/m68k/sun3/sun3ints.c

31
32 static unsigned char led_pattern[8] = {
> 33 (u8)~(0x80), (u8)~(0x01),
34 (u8)~(0x40), (u8)~(0x02),
35 (u8)~(0x20), (u8)~(0x04),
36 (u8)~(0x10), (u8)~(0x08)
37 };
38

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