From: kernel test robot <lkp@intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 11556/11658] net/dsa/tag_rtl4_a.c:57:12: sparse: sparse: incorrect type in assignment (different base types)
Date: Thu, 18 Feb 2021 03:08:47 +0800 [thread overview]
Message-ID: <202102180345.nxLiKUhk-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2902 bytes --]
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 <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> 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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32803 bytes --]
reply other threads:[~2021-02-17 19:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202102180345.nxLiKUhk-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox