From: kernel test robot <lkp@intel.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Mark Brown <broonie@kernel.org>, Arnd Bergmann <arnd@arndb.de>
Subject: drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
Date: Wed, 10 Feb 2021 13:33:19 +0800 [thread overview]
Message-ID: <202102101314.gtC0OJld-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5235 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e0756cfc7d7cd08c98a53b6009c091a3f6a50be6
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
date: 9 months ago
config: arm-randconfig-s032-20210209 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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.3-215-g0fb77bb6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd7ffdbef6888459f301c5889f3b14ada38b913
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bbd7ffdbef6888459f301c5889f3b14ada38b913
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
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 >>)"
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:630:33: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
drivers/hsi/clients/ssi_protocol.c:631:9: sparse: sparse: cast to restricted __be16
>> drivers/hsi/clients/ssi_protocol.c:992:31: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] @@ got restricted __be16 [usertype] @@
drivers/hsi/clients/ssi_protocol.c:992:31: sparse: expected unsigned short [usertype]
drivers/hsi/clients/ssi_protocol.c:992:31: sparse: got restricted __be16 [usertype]
vim +630 drivers/hsi/clients/ssi_protocol.c
dc7bf5d7186849 Sebastian Reichel 2013-11-15 607
dc7bf5d7186849 Sebastian Reichel 2013-11-15 608 /* In soft IRQ context */
dc7bf5d7186849 Sebastian Reichel 2013-11-15 609 static void ssip_pn_rx(struct sk_buff *skb)
dc7bf5d7186849 Sebastian Reichel 2013-11-15 610 {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 611 struct net_device *dev = skb->dev;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 612
dc7bf5d7186849 Sebastian Reichel 2013-11-15 613 if (unlikely(!netif_running(dev))) {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 614 dev_dbg(&dev->dev, "Drop RX packet\n");
dc7bf5d7186849 Sebastian Reichel 2013-11-15 615 dev->stats.rx_dropped++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 616 dev_kfree_skb(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 617 return;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 618 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 619 if (unlikely(!pskb_may_pull(skb, SSIP_MIN_PN_HDR))) {
dc7bf5d7186849 Sebastian Reichel 2013-11-15 620 dev_dbg(&dev->dev, "Error drop RX packet\n");
dc7bf5d7186849 Sebastian Reichel 2013-11-15 621 dev->stats.rx_errors++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 622 dev->stats.rx_length_errors++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 623 dev_kfree_skb(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 624 return;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 625 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 626 dev->stats.rx_packets++;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 627 dev->stats.rx_bytes += skb->len;
dc7bf5d7186849 Sebastian Reichel 2013-11-15 628
dc7bf5d7186849 Sebastian Reichel 2013-11-15 629 /* length field is exchanged in network byte order */
dc7bf5d7186849 Sebastian Reichel 2013-11-15 @630 ((u16 *)skb->data)[2] = ntohs(((u16 *)skb->data)[2]);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 631 dev_dbg(&dev->dev, "RX length fixed (%04x -> %u)\n",
dc7bf5d7186849 Sebastian Reichel 2013-11-15 632 ((u16 *)skb->data)[2], ntohs(((u16 *)skb->data)[2]));
dc7bf5d7186849 Sebastian Reichel 2013-11-15 633
dc7bf5d7186849 Sebastian Reichel 2013-11-15 634 skb->protocol = htons(ETH_P_PHONET);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 635 skb_reset_mac_header(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 636 __skb_pull(skb, 1);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 637 netif_rx(skb);
dc7bf5d7186849 Sebastian Reichel 2013-11-15 638 }
dc7bf5d7186849 Sebastian Reichel 2013-11-15 639
:::::: The code at line 630 was first introduced by commit
:::::: dc7bf5d7186849aa36b9f0e42e250a813a7b0bdb HSI: Introduce driver for SSI Protocol
:::::: TO: Sebastian Reichel <sre@kernel.org>
:::::: CC: Sebastian Reichel <sre@kernel.org>
---
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: 41453 bytes --]
reply other threads:[~2021-02-10 5:35 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=202102101314.gtC0OJld-lkp@intel.com \
--to=lkp@intel.com \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@kernel.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