Netdev List
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: kbuild-all@01.org, netdev@vger.kernel.org
Subject: [net-next:master 57/59] drivers/staging/octeon/octeon-stubs.h:1205:9: warning: cast to pointer from integer of different size
Date: Tue, 30 Jul 2019 05:36:06 +0800	[thread overview]
Message-ID: <201907300554.krMDQEoI%lkp@intel.com> (raw)

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

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 <lkp@intel.com>

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':
>> 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':
>> 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))
                                   ^
>> 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':
>> 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':
>> 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':
>> 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:
>> 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))
                                                                          ^
>> 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:111:36: note: in expansion of macro 'writeq'
    #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr)
                                       ^~~~~~
>> 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);
     ^~~~~~~~~~~~~~~
>> 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))
                                                                          ^
>> 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: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':
>> 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))
                                                                          ^
>> 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: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

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

                 reply	other threads:[~2019-07-29 21:36 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=201907300554.krMDQEoI%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=willy@infradead.org \
    /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