linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Heiner Kallweit <hkallweit1@gmail.com>,
	Bjorn Helgaas <helgaas@kernel.org>,
	Edward Cree <ecree.xilinx@gmail.com>,
	Martin Habets <habetsm.xilinx@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	David Miller <davem@davemloft.net>
Cc: kbuild-all@lists.01.org, netdev@vger.kernel.org,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 01/12] sfc: falcon: Read VPD with pci_vpd_alloc()
Date: Mon, 23 Aug 2021 00:25:56 +0800	[thread overview]
Message-ID: <202108230015.94nVrgF8-lkp@intel.com> (raw)
In-Reply-To: <2a8d069e-9516-50d8-6520-2614222c8f5f@gmail.com>

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

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

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

  reply	other threads:[~2021-08-22 16:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-22 13:46 [PATCH 00/12] PCI/VPD: Convert more users to the new VPD API functions Heiner Kallweit
2021-08-22 13:48 ` [PATCH 01/12] sfc: falcon: Read VPD with pci_vpd_alloc() Heiner Kallweit
2021-08-22 16:25   ` kernel test robot [this message]
2021-08-22 13:49 ` [PATCH 02/12] sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword() Heiner Kallweit
2021-08-22 13:50 ` [PATCH 03/12] bnx2: " Heiner Kallweit
2021-08-22 13:52 ` [PATCH 04/12] bnx2: Replace open-coded version with swab32s() Heiner Kallweit
2021-08-22 13:53 ` [PATCH 05/12] bnx2x: Read VPD with pci_vpd_alloc() Heiner Kallweit
2021-08-22 17:42   ` kernel test robot
2021-08-22 13:54 ` [PATCH 06/12] bnx2x: Search VPD with pci_vpd_find_ro_info_keyword() Heiner Kallweit
2021-08-24 17:02   ` Bjorn Helgaas
2021-08-24 18:01     ` Heiner Kallweit
2021-08-24 18:47       ` Bjorn Helgaas
2021-08-22 13:55 ` [PATCH 07/12] bnxt: Read VPD with pci_vpd_alloc() Heiner Kallweit
2021-08-22 18:39   ` kernel test robot
2021-08-22 13:56 ` [PATCH 08/12] bnxt: Search VPD with pci_vpd_find_ro_info_keyword() Heiner Kallweit
2021-08-22 13:57 ` [PATCH 09/12] cxgb4: Validate VPD checksum with pci_vpd_check_csum() Heiner Kallweit
2021-08-22 13:58 ` [PATCH 10/12] cxgb4: Remove unused vpd_param member ec Heiner Kallweit
2021-08-22 13:59 ` [PATCH 11/12] cxgb4: Search VPD with pci_vpd_find_ro_info_keyword() Heiner Kallweit
2021-08-24 17:11   ` Bjorn Helgaas
2021-08-24 18:06     ` Heiner Kallweit
2021-08-22 14:01 ` [PATCH 12/12] scsi: cxlflash: " Heiner Kallweit
2021-08-24 18:48 ` [PATCH 00/12] PCI/VPD: Convert more users to the new VPD API functions Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108230015.94nVrgF8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=helgaas@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).