mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Greg Ungerer <gerg@linux-m68k.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: arch/m68k/coldfire/pci.c:115:17: sparse: sparse: incorrect type in assignment (different base types)
Date: Sun, 4 Apr 2021 14:50:14 +0800	[thread overview]
Message-ID: <202104041408.LikfeOuP-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 6428 bytes --]

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@intel.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@uclinux.org>
:::::: CC: Greg Ungerer <gerg@uclinux.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27970 bytes --]

                 reply	other threads:[~2021-04-04  6:51 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=202104041408.LikfeOuP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gerg@linux-m68k.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luc.vanoostenryck@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome