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]
Message-ID: <201908071607.7slaSgvJ%lkp@intel.com>
Date:   Wed, 7 Aug 2019 16:05:18 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org
Subject: [net-next:master 102/111] drivers/net/phy/mdio-cavium.h:114:31:
 note: in expansion of macro 'readq'

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/davem/net-next.git master
head:   13dfb3fa494361ea9a5950f27c9cd8b06d28c04f
commit: b8fb640643fcdb3bca84137c4cec0c649b25e056 [102/111] net: mdio-octeon: Fix Kconfig warnings and build errors
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 b8fb640643fcdb3bca84137c4cec0c649b25e056
        # 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 <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from arch/sh/include/asm/io.h:28:0,
                    from include/linux/scatterlist.h:9,
                    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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_set_mode':
   drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   arch/sh/include/mach-common/mach/mangle-port.h:41:23: note: in definition of macro 'ioswabq'
    # define ioswabq(x)  (x)
                          ^
>> arch/sh/include/asm/io.h:43:47: note: in expansion of macro '__raw_readq'
    #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; })
                                                  ^~~~~~~~~~~
>> arch/sh/include/asm/io.h:53:31: note: in expansion of macro 'readq_relaxed'
    #define readq(a)  ({ u64 r_ = readq_relaxed(a); rmb(); r_; })
                                  ^~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:114:31: note: in expansion of macro 'readq'
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                  ^~~~~
>> drivers/net/phy/mdio-cavium.c:21:16: note: in expansion of macro 'oct_mdio_readq'
     smi_clk.u64 = oct_mdio_readq(p->register_base + SMI_CLK);
                   ^~~~~~~~~~~~~~
   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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
>> drivers/net/phy/mdio-cavium.c:24:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_clk.u64, p->register_base + SMI_CLK);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_c45_addr':
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
   drivers/net/phy/mdio-cavium.c:39:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
   drivers/net/phy/mdio-cavium.c:47:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
   In file included from arch/sh/include/asm/io.h:28:0,
                    from include/linux/scatterlist.h:9,
                    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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   arch/sh/include/mach-common/mach/mangle-port.h:41:23: note: in definition of macro 'ioswabq'
    # define ioswabq(x)  (x)
                          ^
>> arch/sh/include/asm/io.h:43:47: note: in expansion of macro '__raw_readq'
    #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; })
                                                  ^~~~~~~~~~~
>> arch/sh/include/asm/io.h:53:31: note: in expansion of macro 'readq_relaxed'
    #define readq(a)  ({ u64 r_ = readq_relaxed(a); rmb(); r_; })
                                  ^~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:114:31: note: in expansion of macro 'readq'
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                  ^~~~~
   drivers/net/phy/mdio-cavium.c:54:16: note: in expansion of macro 'oct_mdio_readq'
      smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
                   ^~~~~~~~~~~~~~
   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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_read':
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
   drivers/net/phy/mdio-cavium.c:86:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
   In file included from arch/sh/include/asm/io.h:28:0,
                    from include/linux/scatterlist.h:9,
                    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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   arch/sh/include/mach-common/mach/mangle-port.h:41:23: note: in definition of macro 'ioswabq'
    # define ioswabq(x)  (x)
                          ^
>> arch/sh/include/asm/io.h:43:47: note: in expansion of macro '__raw_readq'
    #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; })
                                                  ^~~~~~~~~~~
>> arch/sh/include/asm/io.h:53:31: note: in expansion of macro 'readq_relaxed'
    #define readq(a)  ({ u64 r_ = readq_relaxed(a); rmb(); r_; })
                                  ^~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:114:31: note: in expansion of macro 'readq'
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                  ^~~~~
   drivers/net/phy/mdio-cavium.c:93:16: note: in expansion of macro 'oct_mdio_readq'
      smi_rd.u64 = oct_mdio_readq(p->register_base + SMI_RD_DAT);
                   ^~~~~~~~~~~~~~
   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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.c: In function 'cavium_mdiobus_write':
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
   drivers/net/phy/mdio-cavium.c:125:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_wr.u64, p->register_base + SMI_WR_DAT);
     ^~~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113: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))
                                                                          ^
   arch/sh/include/asm/io.h:58:32: note: in expansion of macro 'writeq_relaxed'
    #define writeq(v,a)  ({ wmb(); writeq_relaxed((v),(a)); })
                                   ^~~~~~~~~~~~~~
   drivers/net/phy/mdio-cavium.h:113:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
   drivers/net/phy/mdio-cavium.c:131:2: note: in expansion of macro 'oct_mdio_writeq'
     oct_mdio_writeq(smi_cmd.u64, p->register_base + SMI_CMD);
     ^~~~~~~~~~~~~~~
   In file included from arch/sh/include/asm/io.h:28:0,
                    from include/linux/scatterlist.h:9,
                    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/phy.h:16,
                    from drivers/net/phy/mdio-cavium.c:8:
   drivers/net/phy/mdio-cavium.h:114:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                        ^
   arch/sh/include/mach-common/mach/mangle-port.h:41:23: note: in definition of macro 'ioswabq'
    # define ioswabq(x)  (x)
                          ^
>> arch/sh/include/asm/io.h:43:47: note: in expansion of macro '__raw_readq'
    #define readq_relaxed(c) ({ u64 __v = ioswabq(__raw_readq(c)); __v; })
                                                  ^~~~~~~~~~~
>> arch/sh/include/asm/io.h:53:31: note: in expansion of macro 'readq_relaxed'
    #define readq(a)  ({ u64 r_ = readq_relaxed(a); rmb(); r_; })
                                  ^~~~~~~~~~~~~
>> drivers/net/phy/mdio-cavium.h:114:31: note: in expansion of macro 'readq'
    #define oct_mdio_readq(addr)  readq((void *)addr)
                                  ^~~~~
   drivers/net/phy/mdio-cavium.c:138:16: note: in expansion of macro 'oct_mdio_readq'
      smi_wr.u64 = oct_mdio_readq(p->register_base + SMI_WR_DAT);
                   ^~~~~~~~~~~~~~

vim +/readq +114 drivers/net/phy/mdio-cavium.h

b8fb640643fcdb Nathan Chancellor 2019-08-02  112  
1eefee901fca02 David Daney       2016-03-11  113  #define oct_mdio_writeq(val, addr)	writeq(val, (void *)addr)
1eefee901fca02 David Daney       2016-03-11 @114  #define oct_mdio_readq(addr)		readq((void *)addr)
1eefee901fca02 David Daney       2016-03-11  115  #endif
1eefee901fca02 David Daney       2016-03-11  116  

:::::: The code at line 114 was first introduced by commit
:::::: 1eefee901fca0208b8a56f20cdc134e2b8638ae7 phy: mdio-octeon: Refactor into two files/modules

:::::: TO: David Daney <david.daney@...ium.com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ