K kernel test robot #
Message details and related content
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: cd560d8023bf73c94d755908c8d4a0994dd1ec34 commit: 86dd9868b8788a9063893a97649594af93cd5aa6 [11556/11658] net: dsa: tag_rtl4_a: Support also egress tags config: i386-randconfig-s002-20210215 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-215-g0fb77bb6-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=86dd9868b8788a9063893a97649594af93cd5aa6 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 86dd9868b8788a9063893a97649594af93cd5aa6 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> "sparse warnings: (new ones prefixed by >>)"
quoted
net/dsa/tag_rtl4_a.c:57:12: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
net/dsa/tag_rtl4_a.c:57:12: sparse: expected unsigned short [usertype]
net/dsa/tag_rtl4_a.c:57:12: sparse: got restricted __be16 [usertype]
net/dsa/tag_rtl4_a.c:63:12: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
net/dsa/tag_rtl4_a.c:63:12: sparse: expected unsigned short [usertype]
net/dsa/tag_rtl4_a.c:63:12: sparse: got restricted __be16 [usertype]
vim +57 net/dsa/tag_rtl4_a.c
33
34 static struct sk_buff *rtl4a_tag_xmit(struct sk_buff *skb,
35 struct net_device *dev)
36 {
37 struct dsa_port *dp = dsa_slave_to_port(dev);
38 u8 *tag;
39 u16 *p;
40 u16 out;
41
42 /* Pad out to at least 60 bytes */
43 if (unlikely(eth_skb_pad(skb)))
44 return NULL;
45 if (skb_cow_head(skb, RTL4_A_HDR_LEN) < 0)
46 return NULL;
47
48 netdev_dbg(dev, "add realtek tag to package to port %d\n",
49 dp->index);
50 skb_push(skb, RTL4_A_HDR_LEN);
51
52 memmove(skb->data, skb->data + RTL4_A_HDR_LEN, 2 * ETH_ALEN);
53 tag = skb->data + 2 * ETH_ALEN;
54
55 /* Set Ethertype */
56 p = (u16 *)tag;
> 57 *p = htons(RTL4_A_ETHERTYPE);
58
59 out = (RTL4_A_PROTOCOL_RTL8366RB << 12) | (2 << 8);
60 /* The lower bits is the port numer */
61 out |= (u8)dp->index;
62 p = (u16 *)(tag + 2);
63 *p = htons(out);
64
65 return skb;
66 }
67
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org