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: <202108231305.35WkCXbI-lkp@intel.com>
Date:   Mon, 23 Aug 2021 13:11:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        netdev@...r.kernel.org
Subject: [net-next:master 7/16]
 drivers/net/ethernet/sfc/falcon/efx.c:2798:10: error: implicit declaration
 of function 'pci_vpd_find_ro_info_keyword'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   8d63ee602da381c437c0a4ef7ea882b71d829eb6
commit: 01dbe7129d9ccd5fe940897888645f06327b34ff [7/16] sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword()
config: riscv-randconfig-r014-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 79b55e5038324e61a3abf4e6a9a949c473edd858)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=01dbe7129d9ccd5fe940897888645f06327b34ff
        git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
        git fetch --no-tags net-next master
        git checkout 01dbe7129d9ccd5fe940897888645f06327b34ff
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from drivers/net/ethernet/sfc/falcon/efx.c:9:
   In file included from include/linux/pci.h:38:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
                                                     ~~~~~~~~~~ ^
   drivers/net/ethernet/sfc/falcon/efx.c:2792:13: error: implicit declaration of function 'pci_vpd_alloc' [-Werror,-Wimplicit-function-declaration]
           vpd_data = pci_vpd_alloc(dev, &vpd_size);
                      ^
   drivers/net/ethernet/sfc/falcon/efx.c:2792:11: warning: incompatible integer to pointer conversion assigning to 'u8 *' (aka 'unsigned char *') from 'int' [-Wint-conversion]
           vpd_data = pci_vpd_alloc(dev, &vpd_size);
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/sfc/falcon/efx.c:2798:10: error: implicit declaration of function 'pci_vpd_find_ro_info_keyword' [-Werror,-Wimplicit-function-declaration]
           start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
                   ^
   drivers/net/ethernet/sfc/falcon/efx.c:2798:10: note: did you mean 'pci_vpd_find_info_keyword'?
   include/linux/pci.h:2349:5: note: 'pci_vpd_find_info_keyword' declared here
   int pci_vpd_find_info_keyword(const u8 *buf, unsigned int off,
       ^
   8 warnings and 2 errors generated.


vim +/pci_vpd_find_ro_info_keyword +2798 drivers/net/ethernet/sfc/falcon/efx.c

  2781	
  2782	/* NIC VPD information
  2783	 * Called during probe to display the part number of the installed NIC.
  2784	 */
  2785	static void ef4_probe_vpd_strings(struct ef4_nic *efx)
  2786	{
  2787		struct pci_dev *dev = efx->pci_dev;
  2788		unsigned int vpd_size, kw_len;
  2789		u8 *vpd_data;
  2790		int start;
  2791	
  2792		vpd_data = pci_vpd_alloc(dev, &vpd_size);
  2793		if (IS_ERR(vpd_data)) {
  2794			pci_warn(dev, "Unable to read VPD\n");
  2795			return;
  2796		}
  2797	
> 2798		start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
  2799						     PCI_VPD_RO_KEYWORD_PARTNO, &kw_len);
  2800		if (start < 0)
  2801			pci_warn(dev, "Part number not found or incomplete\n");
  2802		else
  2803			pci_info(dev, "Part Number : %.*s\n", kw_len, vpd_data + start);
  2804	
  2805		start = pci_vpd_find_ro_info_keyword(vpd_data, vpd_size,
  2806						     PCI_VPD_RO_KEYWORD_SERIALNO, &kw_len);
  2807		if (start < 0)
  2808			pci_warn(dev, "Serial number not found or incomplete\n");
  2809		else
  2810			efx->vpd_sn = kmemdup_nul(vpd_data + start, kw_len, GFP_KERNEL);
  2811	
  2812		kfree(vpd_data);
  2813	}
  2814	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ