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(a)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@lists.01.org