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] [day] [month] [year] [list]
Date:   Mon, 23 Aug 2021 00:25:56 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heiner Kallweit <hkallweit1@...il.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Edward Cree <ecree.xilinx@...il.com>,
        Martin Habets <habetsm.xilinx@...il.com>,
        Jakub Kicinski <kuba@...nel.org>,
        David Miller <davem@...emloft.net>
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
        SCSI development list <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH 01/12] sfc: falcon: Read VPD with pci_vpd_alloc()

Hi Heiner,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on pci/next mkp-scsi/for-next linus/master v5.14-rc6 next-20210820]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Heiner-Kallweit/PCI-VPD-Convert-more-users-to-the-new-VPD-API-functions/20210822-220229
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
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
        # https://github.com/0day-ci/linux/commit/f04e3b53e818526cc8b869af3804e375c0a48abf
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Heiner-Kallweit/PCI-VPD-Convert-more-users-to-the-new-VPD-API-functions/20210822-220229
        git checkout f04e3b53e818526cc8b869af3804e375c0a48abf
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=xtensa 

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

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/sfc/falcon/efx.c: In function 'ef4_probe_vpd_strings':
   drivers/net/ethernet/sfc/falcon/efx.c:2792:20: error: implicit declaration of function 'pci_vpd_alloc'; did you mean 'pci_pool_alloc'? [-Werror=implicit-function-declaration]
    2792 |         vpd_data = pci_vpd_alloc(dev, &vpd_size);
         |                    ^~~~~~~~~~~~~
         |                    pci_pool_alloc
>> drivers/net/ethernet/sfc/falcon/efx.c:2792:18: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
    2792 |         vpd_data = pci_vpd_alloc(dev, &vpd_size);
         |                  ^
   cc1: some warnings being treated as errors


vim +2792 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		int ro_start, ro_size, i, j;
  2789		unsigned int vpd_size;
  2790		u8 *vpd_data;
  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		/* Get the Read only section */
  2799		ro_start = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
  2800		if (ro_start < 0) {
  2801			netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n");
  2802			goto out;
  2803		}
  2804	
  2805		ro_size = pci_vpd_lrdt_size(&vpd_data[ro_start]);
  2806		j = ro_size;
  2807		i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
  2808		if (i + j > vpd_size)
  2809			j = vpd_size - i;
  2810	
  2811		/* Get the Part number */
  2812		i = pci_vpd_find_info_keyword(vpd_data, i, j, "PN");
  2813		if (i < 0) {
  2814			netif_err(efx, drv, efx->net_dev, "Part number not found\n");
  2815			goto out;
  2816		}
  2817	
  2818		j = pci_vpd_info_field_size(&vpd_data[i]);
  2819		i += PCI_VPD_INFO_FLD_HDR_SIZE;
  2820		if (i + j > vpd_size) {
  2821			netif_err(efx, drv, efx->net_dev, "Incomplete part number\n");
  2822			goto out;
  2823		}
  2824	
  2825		netif_info(efx, drv, efx->net_dev,
  2826			   "Part Number : %.*s\n", j, &vpd_data[i]);
  2827	
  2828		i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
  2829		j = ro_size;
  2830		i = pci_vpd_find_info_keyword(vpd_data, i, j, "SN");
  2831		if (i < 0) {
  2832			netif_err(efx, drv, efx->net_dev, "Serial number not found\n");
  2833			goto out;
  2834		}
  2835	
  2836		j = pci_vpd_info_field_size(&vpd_data[i]);
  2837		i += PCI_VPD_INFO_FLD_HDR_SIZE;
  2838		if (i + j > vpd_size) {
  2839			netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n");
  2840			goto out;
  2841		}
  2842	
  2843		efx->vpd_sn = kmalloc(j + 1, GFP_KERNEL);
  2844		if (!efx->vpd_sn)
  2845			goto out;
  2846	
  2847		snprintf(efx->vpd_sn, j + 1, "%s", &vpd_data[i]);
  2848	out:
  2849		kfree(vpd_data);
  2850	}
  2851	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ