[linux-next:master 1655/2290] drivers/net/ethernet/broadcom/bnxt/bnxt.c:12343:44: warning: shift count >= width of type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5191249f880367a4cd675825cd721a8d78f26a45
commit: 4721031c3559db8eae61df305f10c00099a7c1d0 [1655/2290] net: move gro definitions to include/net/gro.h
config: riscv-randconfig-r034-20211118 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c46becf500df2a7fb4b4fce16178a036c344315a)
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/next/linux-next.git/commit/?id=4721031c3559db8eae61df305f10c00099a7c1d0
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 4721031c3559db8eae61df305f10c00099a7c1d0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv 

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

All warnings (new ones prefixed by >>):

   In file included from drivers/net/ethernet/broadcom/bnxt/bnxt.c:40:
   include/net/gro.h:413:22: error: implicit declaration of function 'csum_ipv6_magic' [-Werror,-Wimplicit-function-declaration]
           return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr,
                               ^
   include/net/gro.h:413:22: note: did you mean 'csum_tcpudp_magic'?
   include/asm-generic/checksum.h:52:1: note: 'csum_tcpudp_magic' declared here
   csum_tcpudp_magic(__be32 saddr, __be32 daddr, __u32 len,
   ^
   In file included from drivers/net/ethernet/broadcom/bnxt/bnxt.c:45:
   include/net/ip6_checksum.h:34:9: error: conflicting types for 'csum_ipv6_magic'
   __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
           ^
   include/net/gro.h:413:22: note: previous implicit declaration is here
           return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr,
                               ^
>> drivers/net/ethernet/broadcom/bnxt/bnxt.c:12343:44: warning: shift count >= width of type [-Wshift-count-overflow]
           if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) != 0 &&
                                                     ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   1 warning and 2 errors generated.


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

230d1f0de754b4 Michael Chan       2019-08-29  12315  
c0c050c58d8409 Michael Chan       2015-10-22  12316  static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)
c0c050c58d8409 Michael Chan       2015-10-22  12317  {
c0c050c58d8409 Michael Chan       2015-10-22  12318  	int rc;
c0c050c58d8409 Michael Chan       2015-10-22  12319  	struct bnxt *bp = netdev_priv(dev);
c0c050c58d8409 Michael Chan       2015-10-22  12320  
c0c050c58d8409 Michael Chan       2015-10-22  12321  	SET_NETDEV_DEV(dev, &pdev->dev);
c0c050c58d8409 Michael Chan       2015-10-22  12322  
c0c050c58d8409 Michael Chan       2015-10-22  12323  	/* enable device (incl. PCI PM wakeup), and bus-mastering */
c0c050c58d8409 Michael Chan       2015-10-22  12324  	rc = pci_enable_device(pdev);
c0c050c58d8409 Michael Chan       2015-10-22  12325  	if (rc) {
c0c050c58d8409 Michael Chan       2015-10-22  12326  		dev_err(&pdev->dev, "Cannot enable PCI device, aborting\n");
c0c050c58d8409 Michael Chan       2015-10-22  12327  		goto init_err;
c0c050c58d8409 Michael Chan       2015-10-22  12328  	}
c0c050c58d8409 Michael Chan       2015-10-22  12329  
c0c050c58d8409 Michael Chan       2015-10-22  12330  	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
c0c050c58d8409 Michael Chan       2015-10-22  12331  		dev_err(&pdev->dev,
c0c050c58d8409 Michael Chan       2015-10-22  12332  			"Cannot find PCI device base address, aborting\n");
c0c050c58d8409 Michael Chan       2015-10-22  12333  		rc = -ENODEV;
c0c050c58d8409 Michael Chan       2015-10-22  12334  		goto init_err_disable;
c0c050c58d8409 Michael Chan       2015-10-22  12335  	}
c0c050c58d8409 Michael Chan       2015-10-22  12336  
c0c050c58d8409 Michael Chan       2015-10-22  12337  	rc = pci_request_regions(pdev, DRV_MODULE_NAME);
c0c050c58d8409 Michael Chan       2015-10-22  12338  	if (rc) {
c0c050c58d8409 Michael Chan       2015-10-22  12339  		dev_err(&pdev->dev, "Cannot obtain PCI resources, aborting\n");
c0c050c58d8409 Michael Chan       2015-10-22  12340  		goto init_err_disable;
c0c050c58d8409 Michael Chan       2015-10-22  12341  	}
c0c050c58d8409 Michael Chan       2015-10-22  12342  
c0c050c58d8409 Michael Chan       2015-10-22 @12343  	if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) != 0 &&
c0c050c58d8409 Michael Chan       2015-10-22  12344  	    dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) != 0) {
c0c050c58d8409 Michael Chan       2015-10-22  12345  		dev_err(&pdev->dev, "System does not support DMA, aborting\n");
3383176efc0fb0 Zhang Changzhong   2020-11-19  12346  		rc = -EIO;
c54bc3ced51066 Michael Chan       2020-11-20  12347  		goto init_err_release;
c0c050c58d8409 Michael Chan       2015-10-22  12348  	}
c0c050c58d8409 Michael Chan       2015-10-22  12349  
c0c050c58d8409 Michael Chan       2015-10-22  12350  	pci_set_master(pdev);
c0c050c58d8409 Michael Chan       2015-10-22  12351  
c0c050c58d8409 Michael Chan       2015-10-22  12352  	bp->dev = dev;
c0c050c58d8409 Michael Chan       2015-10-22  12353  	bp->pdev = pdev;
c0c050c58d8409 Michael Chan       2015-10-22  12354  
8ae2473842bdbb Michael Chan       2020-05-04  12355  	/* Doorbell BAR bp->bar1 is mapped after bnxt_fw_init_one_p2()
8ae2473842bdbb Michael Chan       2020-05-04  12356  	 * determines the BAR size.
8ae2473842bdbb Michael Chan       2020-05-04  12357  	 */
c0c050c58d8409 Michael Chan       2015-10-22  12358  	bp->bar0 = pci_ioremap_bar(pdev, 0);
c0c050c58d8409 Michael Chan       2015-10-22  12359  	if (!bp->bar0) {
c0c050c58d8409 Michael Chan       2015-10-22  12360  		dev_err(&pdev->dev, "Cannot map device registers, aborting\n");
c0c050c58d8409 Michael Chan       2015-10-22  12361  		rc = -ENOMEM;
c0c050c58d8409 Michael Chan       2015-10-22  12362  		goto init_err_release;
c0c050c58d8409 Michael Chan       2015-10-22  12363  	}
c0c050c58d8409 Michael Chan       2015-10-22  12364  
c0c050c58d8409 Michael Chan       2015-10-22  12365  	bp->bar2 = pci_ioremap_bar(pdev, 4);
c0c050c58d8409 Michael Chan       2015-10-22  12366  	if (!bp->bar2) {
c0c050c58d8409 Michael Chan       2015-10-22  12367  		dev_err(&pdev->dev, "Cannot map bar4 registers, aborting\n");
c0c050c58d8409 Michael Chan       2015-10-22  12368  		rc = -ENOMEM;
c0c050c58d8409 Michael Chan       2015-10-22  12369  		goto init_err_release;
c0c050c58d8409 Michael Chan       2015-10-22  12370  	}
c0c050c58d8409 Michael Chan       2015-10-22  12371  
6316ea6db93d87 Satish Baddipadige 2016-03-07  12372  	pci_enable_pcie_error_reporting(pdev);
6316ea6db93d87 Satish Baddipadige 2016-03-07  12373  
c0c050c58d8409 Michael Chan       2015-10-22  12374  	INIT_WORK(&bp->sp_task, bnxt_sp_task);
230d1f0de754b4 Michael Chan       2019-08-29  12375  	INIT_DELAYED_WORK(&bp->fw_reset_task, bnxt_fw_reset_task);
c0c050c58d8409 Michael Chan       2015-10-22  12376  
c0c050c58d8409 Michael Chan       2015-10-22  12377  	spin_lock_init(&bp->ntp_fltr_lock);
697197e5a17353 Michael Chan       2018-10-14  12378  #if BITS_PER_LONG == 32
697197e5a17353 Michael Chan       2018-10-14  12379  	spin_lock_init(&bp->db_lock);
697197e5a17353 Michael Chan       2018-10-14  12380  #endif
c0c050c58d8409 Michael Chan       2015-10-22  12381  
c0c050c58d8409 Michael Chan       2015-10-22  12382  	bp->rx_ring_size = BNXT_DEFAULT_RX_RING_SIZE;
c0c050c58d8409 Michael Chan       2015-10-22  12383  	bp->tx_ring_size = BNXT_DEFAULT_TX_RING_SIZE;
c0c050c58d8409 Michael Chan       2015-10-22  12384  
18775aa8a91fcd Michael Chan       2017-10-26  12385  	bnxt_init_dflt_coal(bp);
51f307856b60e6 Michael Chan       2016-07-01  12386  
e99e88a9d2b067 Kees Cook          2017-10-16  12387  	timer_setup(&bp->timer, bnxt_timer, 0);
c0c050c58d8409 Michael Chan       2015-10-22  12388  	bp->current_interval = BNXT_TIMER_INTERVAL;
c0c050c58d8409 Michael Chan       2015-10-22  12389  
442a35a5a7aa72 Jakub Kicinski     2020-07-09  12390  	bp->vxlan_fw_dst_port_id = INVALID_HW_RING_ID;
442a35a5a7aa72 Jakub Kicinski     2020-07-09  12391  	bp->nge_fw_dst_port_id = INVALID_HW_RING_ID;
442a35a5a7aa72 Jakub Kicinski     2020-07-09  12392  
caefe526d7b5af Michael Chan       2015-12-09  12393  	clear_bit(BNXT_STATE_OPEN, &bp->state);
c0c050c58d8409 Michael Chan       2015-10-22  12394  	return 0;
c0c050c58d8409 Michael Chan       2015-10-22  12395  
c0c050c58d8409 Michael Chan       2015-10-22  12396  init_err_release:
17086399c113d9 Sathya Perla       2017-02-20  12397  	bnxt_unmap_bars(bp, pdev);
c0c050c58d8409 Michael Chan       2015-10-22  12398  	pci_release_regions(pdev);
c0c050c58d8409 Michael Chan       2015-10-22  12399  
c0c050c58d8409 Michael Chan       2015-10-22  12400  init_err_disable:
c0c050c58d8409 Michael Chan       2015-10-22  12401  	pci_disable_device(pdev);
c0c050c58d8409 Michael Chan       2015-10-22  12402  
c0c050c58d8409 Michael Chan       2015-10-22  12403  init_err:
c0c050c58d8409 Michael Chan       2015-10-22  12404  	return rc;
c0c050c58d8409 Michael Chan       2015-10-22  12405  }
c0c050c58d8409 Michael Chan       2015-10-22  12406  

:::::: The code at line 12343 was first introduced by commit
:::::: c0c050c58d840994ba842ad1c338a98e7c12b764 bnxt_en: New Broadcom ethernet driver.

:::::: TO: Michael Chan <mchan@xxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux