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, 4 Apr 2021 14:50:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Greg Ungerer <gerg@...ux-m68k.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: arch/m68k/coldfire/pci.c:115:17: sparse: sparse: incorrect type in
 assignment (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   2023a53bdf41b7646b1d384b6816af06309f73a5
commit: 005b73d0dd83c9cb9420a196bea8070cde30ecac m68knommu: __force type casts for raw IO access
date:   8 months ago
config: m68k-randconfig-s032-20210403 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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.3-279-g6d5d9b42-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=005b73d0dd83c9cb9420a196bea8070cde30ecac
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 005b73d0dd83c9cb9420a196bea8070cde30ecac
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k 

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


sparse warnings: (new ones prefixed by >>)
   arch/m68k/coldfire/pci.c:80:26: sparse: sparse: cast to restricted __le16
   arch/m68k/coldfire/pci.c:80:26: sparse: sparse: cast to restricted __le16
   arch/m68k/coldfire/pci.c:80:26: sparse: sparse: cast to restricted __le16
   arch/m68k/coldfire/pci.c:80:26: sparse: sparse: cast to restricted __le16
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:83:26: sparse: sparse: cast to restricted __le32
   arch/m68k/coldfire/pci.c:112:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short volatile [usertype] @@     got restricted __le16 [usertype] @@
   arch/m68k/coldfire/pci.c:112:17: sparse:     expected unsigned short volatile [usertype]
   arch/m68k/coldfire/pci.c:112:17: sparse:     got restricted __le16 [usertype]
>> arch/m68k/coldfire/pci.c:115:17: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int volatile [usertype] @@     got restricted __le32 [usertype] @@
   arch/m68k/coldfire/pci.c:115:17: sparse:     expected unsigned int volatile [usertype]
   arch/m68k/coldfire/pci.c:115:17: sparse:     got restricted __le32 [usertype]

vim +115 arch/m68k/coldfire/pci.c

bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   91  
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   92  static int mcf_pci_writeconfig(struct pci_bus *bus, unsigned int devfn,
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   93  	int where, int size, u32 value)
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   94  {
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   95  	unsigned long addr;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   96  
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   97  	if (bus->number == 0) {
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   98  		if (mcf_host_slot2sid[PCI_SLOT(devfn)] == 0)
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29   99  			return PCIBIOS_SUCCESSFUL;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  100  	}
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  101  
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  102  	addr = mcf_mk_pcicar(bus->number, devfn, where);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  103  	__raw_writel(PCICAR_E | addr, PCICAR);
082f55c4598450 arch/m68k/coldfire/pci.c          Greg Ungerer 2018-04-11  104  	__raw_readl(PCICAR);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  105  	addr = iospace + (where & 0x3);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  106  
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  107  	switch (size) {
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  108  	case 1:
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  109  		 __raw_writeb(value, addr);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  110  		break;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  111  	case 2:
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  112  		__raw_writew(cpu_to_le16(value), addr);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  113  		break;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  114  	default:
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29 @115  		__raw_writel(cpu_to_le32(value), addr);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  116  		break;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  117  	}
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  118  
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  119  	__raw_writel(0, PCICAR);
082f55c4598450 arch/m68k/coldfire/pci.c          Greg Ungerer 2018-04-11  120  	__raw_readl(PCICAR);
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  121  	return PCIBIOS_SUCCESSFUL;
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  122  }
bbdea849ed6ba6 arch/m68k/platform/coldfire/pci.c Greg Ungerer 2012-05-29  123  

:::::: The code at line 115 was first introduced by commit
:::::: bbdea849ed6ba694cf1f56801b90f100685e3aa0 m68k: add PCI bus code support for the ColdFire M54xx SoC family

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

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (27970 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ