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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Sep 2019 21:21:33 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Thomas Bogendoerfer <tbogendoerfer@...e.de>
Cc:     kbuild-all@...org, Jonathan Corbet <corbet@....net>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Paul Burton <paul.burton@...s.com>,
        James Hogan <jhogan@...nel.org>,
        Lee Jones <lee.jones@...aro.org>,
        "David S. Miller" <davem@...emloft.net>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jslaby@...e.com>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
        netdev@...r.kernel.org, linux-rtc@...r.kernel.org,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH v6 3/4] mfd: ioc3: Add driver for SGI IOC3 chip

Hi Thomas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3 next-20190920]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/Use-MFD-framework-for-SGI-IOC3-drivers/20190923-194903
config: mips-allmodconfig (attached as .config)
compiler: mips-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
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   drivers//mfd/ioc3.c: In function 'ioc3_eth_setup':
>> drivers//mfd/ioc3.c:281:54: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
       sizeof(ioc3_w1_platform_data.dev_id), "ioc3-%012llx",
                                                   ~~~~~~^
                                                   %012x
       ipd->pdev->resource->start);
       ~~~~~~~~~~~~~~~~~~~~~~~~~~                         
--
   drivers//net/ethernet/sgi/ioc3-eth.c: In function 'ioc3eth_get_mac_addr':
>> drivers//net/ethernet/sgi/ioc3-eth.c:203:47: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
     snprintf(prefix, sizeof(prefix), "ioc3-%012llx-",
                                            ~~~~~~^
                                            %012x
       res->start & ~0xffff);
       ~~~~~~~~~~~~~~~~~~~~                        
   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/mips/include/uapi/asm/byteorder.h:13,
                    from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers//net/ethernet/sgi/ioc3-eth.c:25:
   drivers//net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_rx':
>> arch/mips/include/asm/pci/bridge.h:799:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_BAR  0x0100000000000000
                            ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
>> drivers//net/ethernet/sgi/ioc3-eth.c:429:42: note: in expansion of macro 'PCI64_ATTR_BAR'
      rxr[n_entry] = cpu_to_be64(ioc3_map(d, PCI64_ATTR_BAR));
                                             ^~~~~~~~~~~~~~
   drivers//net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_alloc_rx_bufs':
>> arch/mips/include/asm/pci/bridge.h:799:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_BAR  0x0100000000000000
                            ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers//net/ethernet/sgi/ioc3-eth.c:700:40: note: in expansion of macro 'PCI64_ATTR_BAR'
      ip->rxr[i] = cpu_to_be64(ioc3_map(d, PCI64_ATTR_BAR));
                                           ^~~~~~~~~~~~~~
   In file included from drivers//net/ethernet/sgi/ioc3-eth.c:51:0:
   drivers//net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_start':
   arch/mips/include/asm/pci/bridge.h:797:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREC  0x0400000000000000
                             ^
>> drivers//net/ethernet/sgi/ioc3-eth.c:762:31: note: in expansion of macro 'PCI64_ATTR_PREC'
     ring = ioc3_map(ip->rxr_dma, PCI64_ATTR_PREC);
                                  ^~~~~~~~~~~~~~~
>> drivers//net/ethernet/sgi/ioc3-eth.c:763:14: warning: right shift count >= width of type [-Wshift-count-overflow]
     writel(ring >> 32, &regs->erbr_h);
                 ^~
   In file included from drivers//net/ethernet/sgi/ioc3-eth.c:51:0:
   arch/mips/include/asm/pci/bridge.h:797:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREC  0x0400000000000000
                             ^
   drivers//net/ethernet/sgi/ioc3-eth.c:768:31: note: in expansion of macro 'PCI64_ATTR_PREC'
     ring = ioc3_map(ip->txr_dma, PCI64_ATTR_PREC);
                                  ^~~~~~~~~~~~~~~
   drivers//net/ethernet/sgi/ioc3-eth.c:773:14: warning: right shift count >= width of type [-Wshift-count-overflow]
     writel(ring >> 32, &regs->etbr_h);
                 ^~
   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/mips/include/uapi/asm/byteorder.h:13,
                    from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers//net/ethernet/sgi/ioc3-eth.c:25:
   drivers//net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_start_xmit':
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
>> drivers//net/ethernet/sgi/ioc3-eth.c:1084:43: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p1     = cpu_to_be64(ioc3_map(d1, PCI64_ATTR_PREF));
                                              ^~~~~~~~~~~~~~~
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers//net/ethernet/sgi/ioc3-eth.c:1085:43: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p2     = cpu_to_be64(ioc3_map(d2, PCI64_ATTR_PREF));
                                              ^~~~~~~~~~~~~~~
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers//net/ethernet/sgi/ioc3-eth.c:1095:42: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p1     = cpu_to_be64(ioc3_map(d, PCI64_ATTR_PREF));
                                             ^~~~~~~~~~~~~~~
--
   drivers/net/ethernet/sgi/ioc3-eth.c: In function 'ioc3eth_get_mac_addr':
   drivers/net/ethernet/sgi/ioc3-eth.c:203:47: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t {aka unsigned int}' [-Wformat=]
     snprintf(prefix, sizeof(prefix), "ioc3-%012llx-",
                                            ~~~~~~^
                                            %012x
       res->start & ~0xffff);
       ~~~~~~~~~~~~~~~~~~~~                        
   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/mips/include/uapi/asm/byteorder.h:13,
                    from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers/net/ethernet/sgi/ioc3-eth.c:25:
   drivers/net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_rx':
>> arch/mips/include/asm/pci/bridge.h:799:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_BAR  0x0100000000000000
                            ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers/net/ethernet/sgi/ioc3-eth.c:429:42: note: in expansion of macro 'PCI64_ATTR_BAR'
      rxr[n_entry] = cpu_to_be64(ioc3_map(d, PCI64_ATTR_BAR));
                                             ^~~~~~~~~~~~~~
   drivers/net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_alloc_rx_bufs':
>> arch/mips/include/asm/pci/bridge.h:799:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_BAR  0x0100000000000000
                            ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers/net/ethernet/sgi/ioc3-eth.c:700:40: note: in expansion of macro 'PCI64_ATTR_BAR'
      ip->rxr[i] = cpu_to_be64(ioc3_map(d, PCI64_ATTR_BAR));
                                           ^~~~~~~~~~~~~~
   In file included from drivers/net/ethernet/sgi/ioc3-eth.c:51:0:
   drivers/net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_start':
   arch/mips/include/asm/pci/bridge.h:797:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREC  0x0400000000000000
                             ^
   drivers/net/ethernet/sgi/ioc3-eth.c:762:31: note: in expansion of macro 'PCI64_ATTR_PREC'
     ring = ioc3_map(ip->rxr_dma, PCI64_ATTR_PREC);
                                  ^~~~~~~~~~~~~~~
   drivers/net/ethernet/sgi/ioc3-eth.c:763:14: warning: right shift count >= width of type [-Wshift-count-overflow]
     writel(ring >> 32, &regs->erbr_h);
                 ^~
   In file included from drivers/net/ethernet/sgi/ioc3-eth.c:51:0:
   arch/mips/include/asm/pci/bridge.h:797:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREC  0x0400000000000000
                             ^
   drivers/net/ethernet/sgi/ioc3-eth.c:768:31: note: in expansion of macro 'PCI64_ATTR_PREC'
     ring = ioc3_map(ip->txr_dma, PCI64_ATTR_PREC);
                                  ^~~~~~~~~~~~~~~
   drivers/net/ethernet/sgi/ioc3-eth.c:773:14: warning: right shift count >= width of type [-Wshift-count-overflow]
     writel(ring >> 32, &regs->etbr_h);
                 ^~
   In file included from include/linux/byteorder/big_endian.h:5:0,
                    from arch/mips/include/uapi/asm/byteorder.h:13,
                    from arch/mips/include/asm/bitops.h:19,
                    from include/linux/bitops.h:19,
                    from include/linux/kernel.h:12,
                    from include/linux/delay.h:22,
                    from drivers/net/ethernet/sgi/ioc3-eth.c:25:
   drivers/net/ethernet/sgi/ioc3-eth.c: In function 'ioc3_start_xmit':
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers/net/ethernet/sgi/ioc3-eth.c:1084:43: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p1     = cpu_to_be64(ioc3_map(d1, PCI64_ATTR_PREF));
                                              ^~~~~~~~~~~~~~~
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers/net/ethernet/sgi/ioc3-eth.c:1085:43: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p2     = cpu_to_be64(ioc3_map(d2, PCI64_ATTR_PREF));
                                              ^~~~~~~~~~~~~~~
   arch/mips/include/asm/pci/bridge.h:796:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define PCI64_ATTR_PREF  0x0800000000000000
                             ^
   include/uapi/linux/byteorder/big_endian.h:37:51: note: in definition of macro '__cpu_to_be64'
    #define __cpu_to_be64(x) ((__force __be64)(__u64)(x))
                                                      ^
   drivers/net/ethernet/sgi/ioc3-eth.c:1095:42: note: in expansion of macro 'PCI64_ATTR_PREF'
      desc->p1     = cpu_to_be64(ioc3_map(d, PCI64_ATTR_PREF));
                                             ^~~~~~~~~~~~~~~

vim +799 arch/mips/include/asm/pci/bridge.h

^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  784  
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  785  /* given a DIR_OFF value and a pci/gio 32 bits direct address, determine
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  786   * which xtalk address is accessed
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  787   */
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  788  #define BRIDGE_DIRECT_32_SEG_SIZE	BRIDGE_DMA_DIRECT_SIZE
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  789  #define BRIDGE_DIRECT_32_TO_XTALK(dir_off,adr)		\
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  790  	((dir_off) * BRIDGE_DIRECT_32_SEG_SIZE +	\
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  791  		((adr) & (BRIDGE_DIRECT_32_SEG_SIZE - 1)) + PHYS_RAMBASE)
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  792  
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  793  /* 64-bit address attribute masks */
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  794  #define PCI64_ATTR_TARG_MASK	0xf000000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  795  #define PCI64_ATTR_TARG_SHFT	60
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  796  #define PCI64_ATTR_PREF		0x0800000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  797  #define PCI64_ATTR_PREC		0x0400000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  798  #define PCI64_ATTR_VIRTUAL	0x0200000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16 @799  #define PCI64_ATTR_BAR		0x0100000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  800  #define PCI64_ATTR_RMF_MASK	0x00ff000000000000
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  801  #define PCI64_ATTR_RMF_SHFT	48
^1da177e4c3f41 include/asm-mips/pci/bridge.h Linus Torvalds 2005-04-16  802  

:::::: The code at line 799 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
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" (61987 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ