lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 11 Dec 2022 07:08:08 +0800
From:   kernel test robot <lkp@...el.com>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Greg Ungerer <gerg@...ux-m68k.org>
Subject: arch/m68k/include/asm/gpio.h:50:33: sparse: sparse: cast truncates
 bits from constant value (ffffff7f becomes 7f)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   296a7b7eb79246912de31ee799cb85220931231a
commit: e6e1e7b19fa132d23d09c465942aab4c110d3da9 m68k: coldfire/device.c: only build for MCF_EDMA when h/w macros are defined
date:   9 months ago
config: m68k-randconfig-s043-20221211
compiler: m68k-linux-gcc (GCC) 12.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6e1e7b19fa132d23d09c465942aab4c110d3da9
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e6e1e7b19fa132d23d09c465942aab4c110d3da9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=m68k SHELL=/bin/bash arch/m68k/coldfire/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
   arch/m68k/coldfire/device.c: note: in included file (through include/linux/gpio.h):
>> arch/m68k/include/asm/gpio.h:50:33: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)
>> arch/m68k/include/asm/gpio.h:50:33: sparse: sparse: cast truncates bits from constant value (ffffff7f becomes 7f)

vim +50 arch/m68k/include/asm/gpio.h

af39bb8b07af83 sfking@...dc.com 2009-06-19  29  
af39bb8b07af83 sfking@...dc.com 2009-06-19  30  static inline void gpio_set_value(unsigned gpio, int value)
af39bb8b07af83 sfking@...dc.com 2009-06-19  31  {
af39bb8b07af83 sfking@...dc.com 2009-06-19  32  	if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX) {
af39bb8b07af83 sfking@...dc.com 2009-06-19  33  		if (gpio < MCFGPIO_SCR_START) {
af39bb8b07af83 sfking@...dc.com 2009-06-19  34  			unsigned long flags;
af39bb8b07af83 sfking@...dc.com 2009-06-19  35  			MCFGPIO_PORTTYPE data;
af39bb8b07af83 sfking@...dc.com 2009-06-19  36  
af39bb8b07af83 sfking@...dc.com 2009-06-19  37  			local_irq_save(flags);
eac57949947fa2 Steven King      2012-05-21  38  			data = mcfgpio_read(__mcfgpio_podr(gpio));
af39bb8b07af83 sfking@...dc.com 2009-06-19  39  			if (value)
af39bb8b07af83 sfking@...dc.com 2009-06-19  40  				data |= mcfgpio_bit(gpio);
af39bb8b07af83 sfking@...dc.com 2009-06-19  41  			else
af39bb8b07af83 sfking@...dc.com 2009-06-19  42  				data &= ~mcfgpio_bit(gpio);
eac57949947fa2 Steven King      2012-05-21  43  			mcfgpio_write(data, __mcfgpio_podr(gpio));
af39bb8b07af83 sfking@...dc.com 2009-06-19  44  			local_irq_restore(flags);
af39bb8b07af83 sfking@...dc.com 2009-06-19  45  		} else {
af39bb8b07af83 sfking@...dc.com 2009-06-19  46  			if (value)
af39bb8b07af83 sfking@...dc.com 2009-06-19  47  				mcfgpio_write(mcfgpio_bit(gpio),
af39bb8b07af83 sfking@...dc.com 2009-06-19  48  						MCFGPIO_SETR_PORT(gpio));
af39bb8b07af83 sfking@...dc.com 2009-06-19  49  			else
af39bb8b07af83 sfking@...dc.com 2009-06-19 @50  				mcfgpio_write(~mcfgpio_bit(gpio),
af39bb8b07af83 sfking@...dc.com 2009-06-19  51  						MCFGPIO_CLRR_PORT(gpio));
af39bb8b07af83 sfking@...dc.com 2009-06-19  52  		}
af39bb8b07af83 sfking@...dc.com 2009-06-19  53  	} else
af39bb8b07af83 sfking@...dc.com 2009-06-19  54  		__gpio_set_value(gpio, value);
af39bb8b07af83 sfking@...dc.com 2009-06-19  55  }
af39bb8b07af83 sfking@...dc.com 2009-06-19  56  

:::::: The code at line 50 was first introduced by commit
:::::: af39bb8b07af83b579c90c09ba3943123cdb4132 core generic GPIO support for Freescale Coldfire processors.

:::::: TO: sfking@...dc.com <sfking@...dc.com>
:::::: CC: Greg Ungerer <gerg@...inux.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (154474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ