[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202412021536.QdX5fFb7-lkp@intel.com>
Date: Mon, 2 Dec 2024 15:11:08 +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: e70140ba0d2b1a30467d4af6bcfe761327b9ec95
commit: a3c62a042237d1adeb0290dcb768e17edd6dcd25 net: mtk_eth: add COMPILE_TEST support
date: 3 years ago
config: nios2-randconfig-r121-20241116 (https://download.01.org/0day-ci/archive/20241202/202412021536.QdX5fFb7-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20241202/202412021536.QdX5fFb7-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412021536.QdX5fFb7-lkp@intel.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
drivers/net/ethernet/mediatek/mtk_eth_soc.c:652:9: sparse: sparse: context imbalance in 'mtk_stats_update' - different lock contexts for basic block
drivers/net/ethernet/mediatek/mtk_eth_soc.c:677:50: sparse: sparse: context imbalance in 'mtk_get_stats64' - wrong count at exit
drivers/net/ethernet/mediatek/mtk_eth_soc.c: note: in included file (through include/uapi/linux/swab.h, include/linux/swab.h, include/uapi/linux/byteorder/little_endian.h, ...):
arch/nios2/include/uapi/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini
arch/nios2/include/uapi/asm/swab.h:31:24: sparse: sparse: too many arguments for function __builtin_custom_ini
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://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists