[gerg-m68knommu:armnommu 3/3] drivers/mtd/maps/physmap-ixp4xx.c:47:9: sparse: sparse: incorrect type in assignment (different base types)

kernel test robot <[email protected]>
Newsgroups org.kernel.vger.linux-m68k,dev.linux.lists.oe-kbuild-all
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu.git armnommu
head:   b9d1c6c54795dbb93bb9f68f60a4da071e2ad418
commit: b9d1c6c54795dbb93bb9f68f60a4da071e2ad418 [3/3] ARM: versatile: support configuring versatile machine for no-MMU
config: arm-randconfig-r133-20260519 (https://download.01.org/0day-ci/archive/20260519/[email protected]/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
   drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: sparse: cast to restricted __be16
   drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: sparse: cast to restricted __be16
   drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: sparse: cast to restricted __be16
   drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: sparse: cast to restricted __be16
>> drivers/mtd/maps/physmap-ixp4xx.c:47:9: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short volatile @@     got restricted __be16 [usertype] @@
   drivers/mtd/maps/physmap-ixp4xx.c:47:9: sparse:     expected unsigned short volatile
   drivers/mtd/maps/physmap-ixp4xx.c:47:9: sparse:     got restricted __be16 [usertype]

vim +47 drivers/mtd/maps/physmap-ixp4xx.c

2aba2f2a704d368 Linus Walleij 2019-10-21  39  
2aba2f2a704d368 Linus Walleij 2019-10-21  40  static inline u16 flash_read16(void __iomem *addr)
2aba2f2a704d368 Linus Walleij 2019-10-21  41  {
2aba2f2a704d368 Linus Walleij 2019-10-21 @42  	return be16_to_cpu(__raw_readw((void __iomem *)((unsigned long)addr ^ 0x2)));
2aba2f2a704d368 Linus Walleij 2019-10-21  43  }
2aba2f2a704d368 Linus Walleij 2019-10-21  44  
2aba2f2a704d368 Linus Walleij 2019-10-21  45  static inline void flash_write16(u16 d, void __iomem *addr)
2aba2f2a704d368 Linus Walleij 2019-10-21  46  {
2aba2f2a704d368 Linus Walleij 2019-10-21 @47  	__raw_writew(cpu_to_be16(d), (void __iomem *)((unsigned long)addr ^ 0x2));
2aba2f2a704d368 Linus Walleij 2019-10-21  48  }
2aba2f2a704d368 Linus Walleij 2019-10-21  49  

:::::: The code at line 47 was first introduced by commit
:::::: 2aba2f2a704d368583e832555b25d88265e62b6d mtd: physmap_of: add a hook for Intel IXP4xx flash probing

:::::: TO: Linus Walleij <[email protected]>
:::::: CC: Miquel Raynal <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.