[nomadik:ixp4 5/47] drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16

From: kbuild test robot <hidden>
Date: 2019-03-19 11:29:17

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik.git ixp4
head:   4ad185a5d819c08dcf11f0e0db38a8b0fd5d9081
commit: 1b03afbf7272735af1d6bbd3c7e42d418bed40b4 [5/47] mtd: physmap_of: add a hook for Intel IXP4xx flash probing
reproduce:
        # apt-get install sparse
        git checkout 1b03afbf7272735af1d6bbd3c7e42d418bed40b4
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)
quoted
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:42:16: sparse: cast to restricted __be16
drivers/mtd/maps/physmap-ixp4xx.c:47:22: sparse: incorrect type in argument 1 (different base types) @@    expected unsigned short [unsigned] val @@    got resunsigned short [unsigned] val @@
   drivers/mtd/maps/physmap-ixp4xx.c:47:22:    expected unsigned short [unsigned] val
   drivers/mtd/maps/physmap-ixp4xx.c:47:22:    got restricted __be16 [usertype] <noident>

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

    39	
    40	static inline u16 flash_read16(void __iomem *addr)
    41	{
  > 42		return be16_to_cpu(__raw_readw((void __iomem *)((unsigned long)addr ^ 0x2)));
    43	}
    44	
    45	static inline void flash_write16(u16 d, void __iomem *addr)
    46	{
  > 47		__raw_writew(cpu_to_be16(d), (void __iomem *)((unsigned long)addr ^ 0x2));
    48	}
    49	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help