lkml.org 
[lkml]   [2021]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdrivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:122:31: warning: shift count >= width of type
Hi Léo,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1d94330a437a573cfdf848f6743b1ed169242c8a
commit: 9b22fece786ed641909988da4810bfa8e5d2e592 atlantic: remove architecture depends
date: 3 weeks ago
config: mips-randconfig-r011-20210116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project d7bc3b7ce23b664d6620cdc32370a8614523ca2f)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b22fece786ed641909988da4810bfa8e5d2e592
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9b22fece786ed641909988da4810bfa8e5d2e592
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips

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

In file included from drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:13:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_main.h:12:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_common.h:13:
In file included from include/linux/etherdevice.h:20:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:28:
In file included from include/net/checksum.h:22:
arch/mips/include/asm/checksum.h:161:9: error: unsupported inline asm: input with type 'unsigned long' matching output with type '__wsum' (aka 'unsigned int')
: "0" ((__force unsigned long)daddr),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:122:31: warning: shift count >= width of type [-Wshift-count-overflow]
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
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))
^ ~~~
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c:124:43: warning: shift count >= width of type [-Wshift-count-overflow]
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
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))
^ ~~~
2 warnings and 1 error generated.
--
In file included from drivers/net/ethernet/aquantia/atlantic/aq_ring.c:10:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_ring.h:13:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_common.h:13:
In file included from include/linux/etherdevice.h:20:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:28:
In file included from include/net/checksum.h:22:
arch/mips/include/asm/checksum.h:161:9: error: unsupported inline asm: input with type 'unsigned long' matching output with type '__wsum' (aka 'unsigned int')
: "0" ((__force unsigned long)daddr),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/aq_ring.c:80:21: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
aq_free_rxpage(&rxbuf->rxdata,
^~~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:95:24: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
ret = aq_get_rxpage(&rxbuf->rxdata, order,
^~~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:427:23: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
aq_buf_vaddr(&buff->rxdata),
^~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:433:23: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
aq_buf_vaddr(&buff->rxdata),
^~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:436:49: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
memcpy(__skb_put(skb, hdr_len), aq_buf_vaddr(&buff->rxdata),
^~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:543:28: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
buff->pa = aq_buf_daddr(&buff->rxdata);
^~~~~~~~~~~~
drivers/net/ethernet/aquantia/atlantic/aq_ring.c:560:19: warning: taking address of packed member '' of class or structure 'aq_ring_buff_s' may result in an unaligned pointer value [-Waddress-of-packed-member]
aq_free_rxpage(&buff->rxdata, aq_nic_get_dev(self->aq_nic));
^~~~~~~~~~~~
7 warnings and 1 error generated.
--
In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:10:
In file included from drivers/net/ethernet/aquantia/atlantic/hw_atl/../aq_hw.h:15:
In file included from drivers/net/ethernet/aquantia/atlantic/aq_common.h:13:
In file included from include/linux/etherdevice.h:20:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:28:
In file included from include/net/checksum.h:22:
arch/mips/include/asm/checksum.h:161:9: error: unsupported inline asm: input with type 'unsigned long' matching output with type '__wsum' (aka 'unsigned int')
: "0" ((__force unsigned long)daddr),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1323:7: warning: taking address of packed member 'ns_mac' of class or structure 'hw_fw_request_ptp_adj_freq' may result in an unaligned pointer value [-Waddress-of-packed-member]
&fwreq.ptp_adj_freq.ns_mac,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1324:7: warning: taking address of packed member 'fns_mac' of class or structure 'hw_fw_request_ptp_adj_freq' may result in an unaligned pointer value [-Waddress-of-packed-member]
&fwreq.ptp_adj_freq.fns_mac);
^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1326:7: warning: taking address of packed member 'ns_phy' of class or structure 'hw_fw_request_ptp_adj_freq' may result in an unaligned pointer value [-Waddress-of-packed-member]
&fwreq.ptp_adj_freq.ns_phy,
^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c:1327:7: warning: taking address of packed member 'fns_phy' of class or structure 'hw_fw_request_ptp_adj_freq' may result in an unaligned pointer value [-Waddress-of-packed-member]
&fwreq.ptp_adj_freq.fns_phy);
^~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings and 1 error generated.


vim +122 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c

5b97b0d10eddeeec Igor Russkikh 2018-01-15 117
ab3518acac42751f Mark Starovoytov 2020-06-26 118 static int aq_pci_func_init(struct pci_dev *pdev)
a4d36e20d035140b David VomLehn 2017-01-23 119 {
a26b0b53cc38eb41 Colin Ian King 2018-10-08 120 int err;
a4d36e20d035140b David VomLehn 2017-01-23 121
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 @122 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
b3f0c79cba2060c1 Igor Russkikh 2020-04-30 123 if (!err)
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 124 err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
a4d36e20d035140b David VomLehn 2017-01-23 125 if (err) {
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 126 err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
a4d36e20d035140b David VomLehn 2017-01-23 127 if (!err)
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 128 err = pci_set_consistent_dma_mask(pdev,
a4d36e20d035140b David VomLehn 2017-01-23 129 DMA_BIT_MASK(32));
a4d36e20d035140b David VomLehn 2017-01-23 130 }
a4d36e20d035140b David VomLehn 2017-01-23 131 if (err != 0) {
a4d36e20d035140b David VomLehn 2017-01-23 132 err = -ENOSR;
a4d36e20d035140b David VomLehn 2017-01-23 133 goto err_exit;
a4d36e20d035140b David VomLehn 2017-01-23 134 }
a4d36e20d035140b David VomLehn 2017-01-23 135
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 136 err = pci_request_regions(pdev, AQ_CFG_DRV_NAME "_mmio");
a4d36e20d035140b David VomLehn 2017-01-23 137 if (err < 0)
a4d36e20d035140b David VomLehn 2017-01-23 138 goto err_exit;
a4d36e20d035140b David VomLehn 2017-01-23 139
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 140 pci_set_master(pdev);
a4d36e20d035140b David VomLehn 2017-01-23 141
23ee07ad3c2fd5ad Igor Russkikh 2018-01-19 142 return 0;
a4d36e20d035140b David VomLehn 2017-01-23 143
a4d36e20d035140b David VomLehn 2017-01-23 144 err_exit:
a4d36e20d035140b David VomLehn 2017-01-23 145 return err;
a4d36e20d035140b David VomLehn 2017-01-23 146 }
a4d36e20d035140b David VomLehn 2017-01-23 147

:::::: The code at line 122 was first introduced by commit
:::::: 23ee07ad3c2fd5adf6e9ef21afb9aec489dc3b4e net: aquantia: Cleanup pci functions module

:::::: TO: Igor Russkikh <igor.russkikh@aquantia.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2021-01-16 13:32    [W:0.037 / U:2.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site