[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201010449.pwZ9p571-lkp@intel.com>
Date: Sat, 1 Jan 2022 04:42:05 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: drivers/net/usb/lan78xx.c:2963:27: sparse: sparse: incorrect type in
assignment (different base types)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4f3d93c6eaff6b84e43b63e0d7a119c5920e1020
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
date: 8 months ago
config: i386-randconfig-s002-20211123 (https://download.01.org/0day-ci/archive/20220101/202201010449.pwZ9p571-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d991bb1c8da842a2a0b9dc83b1005e655783f861
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d991bb1c8da842a2a0b9dc83b1005e655783f861
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/net/usb/lan78xx.c:2963:29: sparse: sparse: cast to restricted __be16
>> drivers/net/usb/lan78xx.c:2963:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __wsum [usertype] csum @@ got unsigned short [usertype] @@
drivers/net/usb/lan78xx.c:2963:27: sparse: expected restricted __wsum [usertype] csum
drivers/net/usb/lan78xx.c:2963:27: sparse: got unsigned short [usertype]
vim +2963 drivers/net/usb/lan78xx.c
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2949
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2950 static void lan78xx_rx_csum_offload(struct lan78xx_net *dev,
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2951 struct sk_buff *skb,
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2952 u32 rx_cmd_a, u32 rx_cmd_b)
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2953 {
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2954 /* HW Checksum offload appears to be flawed if used when not stripping
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2955 * VLAN headers. Drop back to S/W checksums under these conditions.
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2956 */
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2957 if (!(dev->net->features & NETIF_F_RXCSUM) ||
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2958 unlikely(rx_cmd_a & RX_CMD_A_ICSM_) ||
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2959 ((rx_cmd_a & RX_CMD_A_FVTG_) &&
9343ac87f2a4e0 Dave Stevenson 2018-06-25 2960 !(dev->net->features & NETIF_F_HW_VLAN_CTAG_RX))) {
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2961 skb->ip_summed = CHECKSUM_NONE;
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2962 } else {
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 @2963 skb->csum = ntohs((u16)(rx_cmd_b >> RX_CMD_B_CSUM_SHIFT_));
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2964 skb->ip_summed = CHECKSUM_COMPLETE;
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2965 }
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2966 }
55d7de9de6c30a Woojung.Huh@...rochip.com 2015-07-30 2967
:::::: The code at line 2963 was first introduced by commit
:::::: 55d7de9de6c30adce8d675c7ce513e283829c2ff Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver
:::::: TO: Woojung.Huh@...rochip.com <Woojung.Huh@...rochip.com>
:::::: CC: David S. Miller <davem@...emloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists