[net-next:master 57/59] drivers/staging/octeon/octeon-stubs.h:1205:9: warning: cast to pointer from integer of different size
From: kbuild test robot <hidden>
Date: 2019-07-29 21:36:41
tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/davem/net-next.git master head: 1cb9dfca39eb406960f8f84864ddd6ba329ec321 commit: 171a9bae68c72f2d1260c3825203760856e6793b [57/59] staging/octeon: Allow test build on !MIPS config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 171a9bae68c72f2d1260c3825203760856e6793b # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=sh If you fix the issue, kindly add following tag Reported-by: kbuild test robot <redacted> All warnings (new ones prefixed by >>): In file included from drivers/staging/octeon/octeon-ethernet.h:41:0, from drivers/staging/octeon/ethernet.c:22: drivers/staging/octeon/octeon-stubs.h: In function 'cvmx_phys_to_ptr':
quoted
drivers/staging/octeon/octeon-stubs.h:1205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (void *)(physical_address);
^
--
In file included from drivers/staging/octeon/octeon-ethernet.h:41:0,
from drivers/staging/octeon/ethernet-mem.c:12:
drivers/staging/octeon/octeon-stubs.h: In function 'cvmx_phys_to_ptr':quoted
drivers/staging/octeon/octeon-stubs.h:1205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (void *)(physical_address);
^
In file included from include/linux/scatterlist.h:9:0,
from include/linux/dma-mapping.h:11,
from include/linux/skbuff.h:31,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from include/linux/netdevice.h:37,
from drivers/staging/octeon/ethernet-mem.c:9:
drivers/staging/octeon/ethernet-mem.c: In function 'cvm_oct_free_hw_memory':
arch/sh/include/asm/io.h:244:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define phys_to_virt(address) ((void *)(address))
^quoted
drivers/staging/octeon/ethernet-mem.c:123:18: note: in expansion of macro 'phys_to_virt'
fpa = (char *)phys_to_virt(cvmx_ptr_to_phys(fpa));
^~~~~~~~~~~~
--
In file included from drivers/staging/octeon/octeon-ethernet.h:41:0,
from drivers/staging/octeon/ethernet-tx.c:25:
drivers/staging/octeon/octeon-stubs.h: In function 'cvmx_phys_to_ptr':quoted
drivers/staging/octeon/octeon-stubs.h:1205:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (void *)(physical_address);
^
drivers/staging/octeon/ethernet-tx.c: In function 'cvm_oct_xmit':quoted
drivers/staging/octeon/ethernet-tx.c:264:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)skb->data);
^
drivers/staging/octeon/octeon-stubs.h:2:30: note: in definition of macro 'XKPHYS_TO_PHYS'
#define XKPHYS_TO_PHYS(p) (p)
^
drivers/staging/octeon/ethernet-tx.c:268:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)skb->data);
^
drivers/staging/octeon/octeon-stubs.h:2:30: note: in definition of macro 'XKPHYS_TO_PHYS'
#define XKPHYS_TO_PHYS(p) (p)
^
drivers/staging/octeon/ethernet-tx.c:276:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
XKPHYS_TO_PHYS((u64)skb_frag_address(fs));
^
drivers/staging/octeon/octeon-stubs.h:2:30: note: in definition of macro 'XKPHYS_TO_PHYS'
#define XKPHYS_TO_PHYS(p) (p)
^
drivers/staging/octeon/ethernet-tx.c:280:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
hw_buffer.s.addr = XKPHYS_TO_PHYS((u64)CVM_OCT_SKB_CB(skb));
^
drivers/staging/octeon/octeon-stubs.h:2:30: note: in definition of macro 'XKPHYS_TO_PHYS'
#define XKPHYS_TO_PHYS(p) (p)
^
--
drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_probe':quoted
drivers/net/phy/mdio-octeon.c:48:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
(u64)devm_ioremap(&pdev->dev, mdio_phys, regsize);
^
In file included from include/linux/io.h:13:0,
from include/linux/of_address.h:7,
from drivers/net/phy/mdio-octeon.c:7:quoted
drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
arch/sh/include/asm/io.h:33:71: note: in definition of macro '__raw_writeq'
#define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v))
^quoted
arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
#define writeq(v,a) ({ wmb(); writeq_relaxed((v),(a)); })
^~~~~~~~~~~~~~quoted
drivers/net/phy/mdio-cavium.h:111:36: note: in expansion of macro 'writeq'
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^~~~~~quoted
drivers/net/phy/mdio-octeon.c:56:2: note: in expansion of macro 'oct_mdio_writeq'
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
^~~~~~~~~~~~~~~quoted
drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
arch/sh/include/asm/io.h:33:71: note: in definition of macro '__raw_writeq'
#define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v))
^quoted
arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
#define writeq(v,a) ({ wmb(); writeq_relaxed((v),(a)); })
^~~~~~~~~~~~~~quoted
drivers/net/phy/mdio-cavium.h:111:36: note: in expansion of macro 'writeq'
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^~~~~~
drivers/net/phy/mdio-octeon.c:77:2: note: in expansion of macro 'oct_mdio_writeq'
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
^~~~~~~~~~~~~~~
drivers/net/phy/mdio-octeon.c: In function 'octeon_mdiobus_remove':quoted
drivers/net/phy/mdio-cavium.h:111:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^
arch/sh/include/asm/io.h:33:71: note: in definition of macro '__raw_writeq'
#define __raw_writeq(v,a) (__chk_io_ptr(a), *(volatile u64 __force *)(a) = (v))
^quoted
arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
#define writeq(v,a) ({ wmb(); writeq_relaxed((v),(a)); })
^~~~~~~~~~~~~~quoted
drivers/net/phy/mdio-cavium.h:111:36: note: in expansion of macro 'writeq'
#define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
^~~~~~
drivers/net/phy/mdio-octeon.c:91:2: note: in expansion of macro 'oct_mdio_writeq'
oct_mdio_writeq(smi_en.u64, bus->register_base + SMI_EN);
^~~~~~~~~~~~~~~
vim +1205 drivers/staging/octeon/octeon-stubs.h
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation Attachments
- .config.gz [application/gzip] 51905 bytes