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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108231451.g5EWTxzn-lkp@intel.com>
Date:   Mon, 23 Aug 2021 14:49:58 +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 16/16]
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:2782:8: 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: 8d63ee602da381c437c0a4ef7ea882b71d829eb6 [16/16] cxgb4: 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=8d63ee602da381c437c0a4ef7ea882b71d829eb6
        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 8d63ee602da381c437c0a4ef7ea882b71d829eb6
        # 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/chelsio/cxgb4/t4_hw.c:36:
   In file included from drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:42:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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/chelsio/cxgb4/t4_hw.c:36:
   In file included from drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:42:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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/chelsio/cxgb4/t4_hw.c:36:
   In file included from drivers/net/ethernet/chelsio/cxgb4/cxgb4.h:42:
   In file included from include/linux/ethtool.h:18:
   In file included from include/uapi/linux/ethtool.h:19:
   In file included from include/linux/if_ether.h:19:
   In file included from include/linux/skbuff.h:31:
   In file included from include/linux/dma-mapping.h:10:
   In file included from include/linux/scatterlist.h:9:
   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/chelsio/cxgb4/t4_hw.c:2775:8: error: implicit declaration of function 'pci_vpd_check_csum' [-Werror,-Wimplicit-function-declaration]
           ret = pci_vpd_check_csum(vpd, VPD_LEN);
                 ^
>> drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:2782:8: error: implicit declaration of function 'pci_vpd_find_ro_info_keyword' [-Werror,-Wimplicit-function-declaration]
           ret = pci_vpd_find_ro_info_keyword(vpd, VPD_LEN,
                 ^
   drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:2782:8: 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,
       ^
   7 warnings and 2 errors generated.


vim +/pci_vpd_find_ro_info_keyword +2782 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

  2736	
  2737	/**
  2738	 *	t4_get_raw_vpd_params - read VPD parameters from VPD EEPROM
  2739	 *	@adapter: adapter to read
  2740	 *	@p: where to store the parameters
  2741	 *
  2742	 *	Reads card parameters stored in VPD EEPROM.
  2743	 */
  2744	int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p)
  2745	{
  2746		unsigned int id_len, pn_len, sn_len, na_len;
  2747		int sn, pn, na, addr, ret = 0;
  2748		u8 *vpd, base_val = 0;
  2749	
  2750		vpd = vmalloc(VPD_LEN);
  2751		if (!vpd)
  2752			return -ENOMEM;
  2753	
  2754		/* Card information normally starts at VPD_BASE but early cards had
  2755		 * it at 0.
  2756		 */
  2757		ret = pci_read_vpd(adapter->pdev, VPD_BASE, 1, &base_val);
  2758		if (ret < 0)
  2759			goto out;
  2760	
  2761		addr = base_val == PCI_VPD_LRDT_ID_STRING ? VPD_BASE : VPD_BASE_OLD;
  2762	
  2763		ret = pci_read_vpd(adapter->pdev, addr, VPD_LEN, vpd);
  2764		if (ret < 0)
  2765			goto out;
  2766	
  2767		if (vpd[0] != PCI_VPD_LRDT_ID_STRING) {
  2768			dev_err(adapter->pdev_dev, "missing VPD ID string\n");
  2769			ret = -EINVAL;
  2770			goto out;
  2771		}
  2772	
  2773		id_len = pci_vpd_lrdt_size(vpd);
  2774	
  2775		ret = pci_vpd_check_csum(vpd, VPD_LEN);
  2776		if (ret) {
  2777			dev_err(adapter->pdev_dev, "VPD checksum incorrect or missing\n");
  2778			ret = -EINVAL;
  2779			goto out;
  2780		}
  2781	
> 2782		ret = pci_vpd_find_ro_info_keyword(vpd, VPD_LEN,
  2783						   PCI_VPD_RO_KEYWORD_SERIALNO, &sn_len);
  2784		if (ret < 0)
  2785			goto out;
  2786		sn = ret;
  2787	
  2788		ret = pci_vpd_find_ro_info_keyword(vpd, VPD_LEN,
  2789						   PCI_VPD_RO_KEYWORD_PARTNO, &pn_len);
  2790		if (ret < 0)
  2791			goto out;
  2792		pn = ret;
  2793	
  2794		ret = pci_vpd_find_ro_info_keyword(vpd, VPD_LEN, "NA", &na_len);
  2795		if (ret < 0)
  2796			goto out;
  2797		na = ret;
  2798	
  2799		memcpy(p->id, vpd + PCI_VPD_LRDT_TAG_SIZE, min_t(int, id_len, ID_LEN));
  2800		strim(p->id);
  2801		memcpy(p->sn, vpd + sn, min_t(int, sn_len, SERNUM_LEN));
  2802		strim(p->sn);
  2803		memcpy(p->pn, vpd + pn, min_t(int, pn_len, PN_LEN));
  2804		strim(p->pn);
  2805		memcpy(p->na, vpd + na, min_t(int, na_len, MACADDR_LEN));
  2806		strim((char *)p->na);
  2807	
  2808	out:
  2809		vfree(vpd);
  2810		if (ret < 0) {
  2811			dev_err(adapter->pdev_dev, "error reading VPD\n");
  2812			return ret;
  2813		}
  2814	
  2815		return 0;
  2816	}
  2817	

---
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