All of lore.kernel.org
 help / color / mirror / Atom feed
* [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'
@ 2021-08-23  5:11 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-23  5:11 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: clang-built-linux, kbuild-all, netdev

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

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

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [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'
@ 2021-08-23  5:11 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-08-23  5:11 UTC (permalink / raw)
  To: kbuild-all

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

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@intel.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(a)lists.01.org

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-23  5:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-23  5:11 [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' kernel test robot
2021-08-23  5:11 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.