All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [android-goldfish:android-3.18 349/362] drivers/staging/wlan-ng/p80211netdev.c:235:41: sparse: sparse: cast to restricted __le16
Date: Mon, 16 Nov 2020 04:08:45 +0800	[thread overview]
Message-ID: <202011160442.bUSNf18V-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3449 bytes --]

tree:   https://android.googlesource.com/kernel/goldfish android-3.18
head:   145dffbee46bf9294a60c79e32c2397b27a6853e
commit: a6cb2a3ff14ca4b576a826eddd79006fcfc9f1b2 [349/362] staging: wlan-ng: add missing byte order conversion
config: x86_64-randconfig-s021-20201103 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-107-gaf3512a6-dirty
        git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
        git fetch --no-tags android-goldfish android-3.18
        git checkout a6cb2a3ff14ca4b576a826eddd79006fcfc9f1b2
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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/staging/wlan-ng/p80211netdev.c:361:24: sparse: sparse: restricted __be16 degrades to integer
   drivers/staging/wlan-ng/p80211netdev.c:372:16: sparse: sparse: restricted __be16 degrades to integer
>> drivers/staging/wlan-ng/p80211netdev.c:235:41: sparse: sparse: cast to restricted __le16
   In file included from drivers/staging/wlan-ng/p80211netdev.c:54:0:
   include/linux/sched.h:1067:42: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
    const struct sched_group_energy * const(*sched_domain_energy_f)(int cpu);
                                             ^
   arch/x86/include/asm/bitops.h: Assembler messages:
   arch/x86/include/asm/bitops.h:211: Warning: no instruction mnemonic suffix given and no register operands; using default for `bts'

vim +235 drivers/staging/wlan-ng/p80211netdev.c

   220	
   221	/**
   222	 * p80211_convert_to_ether - conversion from 802.11 frame to ethernet frame
   223	 * @wlandev: pointer to WLAN device
   224	 * @skb: pointer to socket buffer
   225	 *
   226	 * Returns: 0 if conversion succeeded
   227	 *	    CONV_TO_ETHER_FAILED if conversion failed
   228	 *	    CONV_TO_ETHER_SKIPPED if frame is ignored
   229	 */
   230	static int p80211_convert_to_ether(wlandevice_t *wlandev, struct sk_buff *skb)
   231	{
   232		struct p80211_hdr_a3 *hdr;
   233	
   234		hdr = (struct p80211_hdr_a3 *) skb->data;
 > 235		if (p80211_rx_typedrop(wlandev, le16_to_cpu(hdr->fc)))
   236			return CONV_TO_ETHER_SKIPPED;
   237	
   238		/* perform mcast filtering: allow my local address through but reject
   239		 * anything else that isn't multicast
   240		 */
   241		if (wlandev->netdev->flags & IFF_ALLMULTI) {
   242			if (!ether_addr_equal_unaligned(wlandev->netdev->dev_addr,
   243							hdr->a1)) {
   244				if (!is_multicast_ether_addr(hdr->a1))
   245					return CONV_TO_ETHER_SKIPPED;
   246			}
   247		}
   248	
   249		if (skb_p80211_to_ether(wlandev, wlandev->ethconv, skb) == 0) {
   250			skb->dev->last_rx = jiffies;
   251			wlandev->netdev->stats.rx_packets++;
   252			wlandev->netdev->stats.rx_bytes += skb->len;
   253			netif_rx_ni(skb);
   254			return 0;
   255		}
   256	
   257		netdev_dbg(wlandev->netdev, "p80211_convert_to_ether failed.\n");
   258		return CONV_TO_ETHER_FAILED;
   259	}
   260	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27525 bytes --]

             reply	other threads:[~2020-11-15 20:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 20:08 kernel test robot [this message]
2020-12-30 16:19 [android-goldfish:android-3.18 349/362] drivers/staging/wlan-ng/p80211netdev.c:235:41: sparse: sparse: cast to restricted __le16 kernel test robot
2021-03-27 16:19 kernel test robot
2021-05-25 20:11 kernel test robot
2021-07-02 19:16 kernel test robot

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=202011160442.bUSNf18V-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.