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]
Message-ID: <202108230210.ISqYlhWT-lkp@intel.com>
Date:   Mon, 23 Aug 2021 02:39:58 +0800
From:   kernel test robot <lkp@...el.com>
To:     Heiner Kallweit <hkallweit1@...il.com>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Michael Chan <michael.chan@...adcom.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>
Subject: Re: [PATCH 07/12] bnxt: 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/5658a697843355ac5fbf26ae3b7c57dd0d794238
        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 5658a697843355ac5fbf26ae3b7c57dd0d794238
        # 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/broadcom/bnxt/bnxt.c: In function 'bnxt_request_irq':
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:9000:16: warning: variable 'j' set but not used [-Wunused-but-set-variable]
    9000 |         int i, j, rc = 0;
         |                ^
   drivers/net/ethernet/broadcom/bnxt/bnxt.c: In function 'bnxt_vpd_read_info':
   drivers/net/ethernet/broadcom/bnxt/bnxt.c:12987:20: error: implicit declaration of function 'pci_vpd_alloc'; did you mean 'pci_pool_alloc'? [-Werror=implicit-function-declaration]
   12987 |         vpd_data = pci_vpd_alloc(pdev, &vpd_size);
         |                    ^~~~~~~~~~~~~
         |                    pci_pool_alloc
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:12987:18: warning: assignment to 'u8 *' {aka 'unsigned char *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
   12987 |         vpd_data = pci_vpd_alloc(pdev, &vpd_size);
         |                  ^
   cc1: some warnings being treated as errors


vim +12987 drivers/net/ethernet/broadcom/bnxt/bnxt.c

 12979	
 12980	static void bnxt_vpd_read_info(struct bnxt *bp)
 12981	{
 12982		struct pci_dev *pdev = bp->pdev;
 12983		int i, len, pos, ro_size, size;
 12984		unsigned int vpd_size;
 12985		u8 *vpd_data;
 12986	
 12987		vpd_data = pci_vpd_alloc(pdev, &vpd_size);
 12988		if (IS_ERR(vpd_data)) {
 12989			pci_warn(pdev, "Unable to read VPD\n");
 12990			return;
 12991		}
 12992	
 12993		i = pci_vpd_find_tag(vpd_data, vpd_size, PCI_VPD_LRDT_RO_DATA);
 12994		if (i < 0) {
 12995			netdev_err(bp->dev, "VPD READ-Only not found\n");
 12996			goto exit;
 12997		}
 12998	
 12999		ro_size = pci_vpd_lrdt_size(&vpd_data[i]);
 13000		i += PCI_VPD_LRDT_TAG_SIZE;
 13001		if (i + ro_size > vpd_size)
 13002			goto exit;
 13003	
 13004		pos = pci_vpd_find_info_keyword(vpd_data, i, ro_size,
 13005						PCI_VPD_RO_KEYWORD_PARTNO);
 13006		if (pos < 0)
 13007			goto read_sn;
 13008	
 13009		len = pci_vpd_info_field_size(&vpd_data[pos]);
 13010		pos += PCI_VPD_INFO_FLD_HDR_SIZE;
 13011		if (len + pos > vpd_size)
 13012			goto read_sn;
 13013	
 13014		size = min(len, BNXT_VPD_FLD_LEN - 1);
 13015		memcpy(bp->board_partno, &vpd_data[pos], size);
 13016	
 13017	read_sn:
 13018		pos = pci_vpd_find_info_keyword(vpd_data, i, ro_size,
 13019						PCI_VPD_RO_KEYWORD_SERIALNO);
 13020		if (pos < 0)
 13021			goto exit;
 13022	
 13023		len = pci_vpd_info_field_size(&vpd_data[pos]);
 13024		pos += PCI_VPD_INFO_FLD_HDR_SIZE;
 13025		if (len + pos > vpd_size)
 13026			goto exit;
 13027	
 13028		size = min(len, BNXT_VPD_FLD_LEN - 1);
 13029		memcpy(bp->board_serialno, &vpd_data[pos], size);
 13030	exit:
 13031		kfree(vpd_data);
 13032	}
 13033	

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