[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202212110641.lLYocbFv-lkp@intel.com>
Date: Sun, 11 Dec 2022 06:37:49 +0800
From: kernel test robot <lkp@...el.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse:
incorrect type in argument 1 (different base types)
Hi Lorenzo,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 296a7b7eb79246912de31ee799cb85220931231a
commit: a3c62a042237d1adeb0290dcb768e17edd6dcd25 net: mtk_eth: add COMPILE_TEST support
date: 12 months ago
config: alpha-randconfig-s043-20221211
compiler: alpha-linux-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a3c62a042237d1adeb0290dcb768e17edd6dcd25
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a3c62a042237d1adeb0290dcb768e17edd6dcd25
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/ethernet/mediatek/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1113:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __sum16 [usertype] check @@ got restricted __be16 [usertype] @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1113:45: sparse: expected restricted __sum16 [usertype] check
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1113:45: sparse: got restricted __be16 [usertype]
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1801:22: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 [usertype] ip @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1801:22: sparse: expected unsigned int [usertype] val
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1801:22: sparse: got restricted __be32 [usertype] ip
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: cast from restricted __be32
>> drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] val @@ got restricted __be32 [usertype] ip4dst @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: expected unsigned int [usertype] val
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: got restricted __be32 [usertype] ip4dst
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: cast from restricted __be32
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: cast from restricted __be32
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: cast from restricted __be32
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1846:40: sparse: sparse: cast from restricted __be32
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1903:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] ip4dst @@ got unsigned int @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1903:38: sparse: expected restricted __be32 [usertype] ip4dst
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1903:38: sparse: got unsigned int
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1907:38: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be32 [usertype] ip4src @@ got unsigned int @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1907:38: sparse: expected restricted __be32 [usertype] ip4src
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1907:38: sparse: got unsigned int
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1909:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] psrc @@ got int @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1909:36: sparse: expected restricted __be16 [usertype] psrc
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1909:36: sparse: got int
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1911:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __be16 [usertype] pdst @@ got int @@
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1911:36: sparse: expected restricted __be16 [usertype] pdst
drivers/net/ethernet/mediatek/mtk_eth_soc.c:1911:36: sparse: got int
vim +1846 drivers/net/ethernet/mediatek/mtk_eth_soc.c
7aab747e5563ec Nelson Chang 2016-09-17 1831
7aab747e5563ec Nelson Chang 2016-09-17 1832 static int mtk_hwlro_add_ipaddr(struct net_device *dev,
7aab747e5563ec Nelson Chang 2016-09-17 1833 struct ethtool_rxnfc *cmd)
7aab747e5563ec Nelson Chang 2016-09-17 1834 {
7aab747e5563ec Nelson Chang 2016-09-17 1835 struct ethtool_rx_flow_spec *fsp =
7aab747e5563ec Nelson Chang 2016-09-17 1836 (struct ethtool_rx_flow_spec *)&cmd->fs;
7aab747e5563ec Nelson Chang 2016-09-17 1837 struct mtk_mac *mac = netdev_priv(dev);
7aab747e5563ec Nelson Chang 2016-09-17 1838 struct mtk_eth *eth = mac->hw;
7aab747e5563ec Nelson Chang 2016-09-17 1839 int hwlro_idx;
7aab747e5563ec Nelson Chang 2016-09-17 1840
7aab747e5563ec Nelson Chang 2016-09-17 1841 if ((fsp->flow_type != TCP_V4_FLOW) ||
7aab747e5563ec Nelson Chang 2016-09-17 1842 (!fsp->h_u.tcp_ip4_spec.ip4dst) ||
7aab747e5563ec Nelson Chang 2016-09-17 1843 (fsp->location > 1))
7aab747e5563ec Nelson Chang 2016-09-17 1844 return -EINVAL;
7aab747e5563ec Nelson Chang 2016-09-17 1845
7aab747e5563ec Nelson Chang 2016-09-17 @1846 mac->hwlro_ip[fsp->location] = htonl(fsp->h_u.tcp_ip4_spec.ip4dst);
7aab747e5563ec Nelson Chang 2016-09-17 1847 hwlro_idx = (mac->id * MTK_MAX_LRO_IP_CNT) + fsp->location;
7aab747e5563ec Nelson Chang 2016-09-17 1848
7aab747e5563ec Nelson Chang 2016-09-17 1849 mac->hwlro_ip_cnt = mtk_hwlro_get_ip_cnt(mac);
7aab747e5563ec Nelson Chang 2016-09-17 1850
7aab747e5563ec Nelson Chang 2016-09-17 1851 mtk_hwlro_val_ipaddr(eth, hwlro_idx, mac->hwlro_ip[fsp->location]);
7aab747e5563ec Nelson Chang 2016-09-17 1852
7aab747e5563ec Nelson Chang 2016-09-17 1853 return 0;
7aab747e5563ec Nelson Chang 2016-09-17 1854 }
7aab747e5563ec Nelson Chang 2016-09-17 1855
:::::: The code at line 1846 was first introduced by commit
:::::: 7aab747e5563ecbc9f3cb64ddea13fe7b9fee2bd net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO
:::::: TO: Nelson Chang <nelson.chang@...iatek.com>
:::::: CC: David S. Miller <davem@...emloft.net>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (171556 bytes)
Powered by blists - more mailing lists