tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing head: 40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1 commit: b0998f0c040daf798d2f847d9588d57f2e2ade69 [46/59] staging: wfx: add IRQ handling config: sparc64-allmodconfig (attached as .config) compiler: sparc64-linux-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout b0998f0c040daf798d2f847d9588d57f2e2ade69 # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=sparc64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): In file included from include/linux/byteorder/big_endian.h:5:0, from arch/sparc/include/uapi/asm/byteorder.h:5, from arch/sparc/include/asm/bitops_64.h:16, from arch/sparc/include/asm/bitops.h:5, from include/linux/bitops.h:19, from include/linux/kernel.h:12, from include/asm-generic/bug.h:19, from arch/sparc/include/asm/bug.h:25, from include/linux/bug.h:5, from include/linux/gpio/consumer.h:5, from drivers/staging/wfx/bh.c:8: drivers/staging/wfx/bh.c: In function 'rx_helper': >> include/uapi/linux/byteorder/big_endian.h:97:37: warning: passing argument 1 of '__swab16s' makes pointer from integer without a cast [-Wint-conversion] #define __le16_to_cpus(x) __swab16s((x)) ^ >> include/linux/byteorder/generic.h:115:22: note: in expansion of macro '__le16_to_cpus' #define le16_to_cpus __le16_to_cpus ^~~~~~~~~~~~~~ >> drivers/staging/wfx/bh.c:76:3: note: in expansion of macro 'le16_to_cpus' le16_to_cpus(hif->len); ^~~~~~~~~~~~ In file included from include/linux/swab.h:5:0, from include/uapi/linux/byteorder/big_endian.h:13, from include/linux/byteorder/big_endian.h:5, from arch/sparc/include/uapi/asm/byteorder.h:5, from arch/sparc/include/asm/bitops_64.h:16, from arch/sparc/include/asm/bitops.h:5, from include/linux/bitops.h:19, from include/linux/kernel.h:12, from include/asm-generic/bug.h:19, from arch/sparc/include/asm/bug.h:25, from include/linux/bug.h:5, from include/linux/gpio/consumer.h:5, from drivers/staging/wfx/bh.c:8: include/uapi/linux/swab.h:230:20: note: expected '__u16 * {aka short unsigned int *}' but argument is of type 'uint16_t {aka short unsigned int}' static inline void __swab16s(__u16 *p) ^~~~~~~~~ vim +/le16_to_cpus +76 drivers/staging/wfx/bh.c > 8 #include 9 #include 10 11 #include "bh.h" 12 #include "wfx.h" 13 #include "hwio.h" 14 #include "hif_api_cmd.h" 15 16 static void device_wakeup(struct wfx_dev *wdev) 17 { 18 if (!wdev->pdata.gpio_wakeup) 19 return; 20 if (gpiod_get_value(wdev->pdata.gpio_wakeup)) 21 return; 22 23 gpiod_set_value(wdev->pdata.gpio_wakeup, 1); 24 if (wfx_api_older_than(wdev, 1, 4)) { 25 if (!completion_done(&wdev->hif.ctrl_ready)) 26 udelay(2000); 27 } else { 28 // completion.h does not provide any function to wait 29 // completion without consume it (a kind of 30 // wait_for_completion_done_timeout()). So we have to emulate 31 // it. 32 if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, msecs_to_jiffies(2) + 1)) 33 complete(&wdev->hif.ctrl_ready); 34 else 35 dev_err(wdev->dev, "timeout while wake up chip\n"); 36 } 37 } 38 39 static void device_release(struct wfx_dev *wdev) 40 { 41 if (!wdev->pdata.gpio_wakeup) 42 return; 43 44 gpiod_set_value(wdev->pdata.gpio_wakeup, 0); 45 } 46 47 static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) 48 { 49 struct sk_buff *skb; 50 struct hif_msg *hif; 51 size_t alloc_len; 52 size_t computed_len; 53 int release_count; 54 int piggyback = 0; 55 56 WARN_ON(read_len < 4); 57 WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), 58 "%s: request exceed WFx capability", __func__); 59 60 // Add 2 to take into account piggyback size 61 alloc_len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, read_len + 2); 62 skb = dev_alloc_skb(alloc_len); 63 if (!skb) 64 return -ENOMEM; 65 66 if (wfx_data_read(wdev, skb->data, alloc_len)) 67 goto err; 68 69 piggyback = le16_to_cpup((u16 *) (skb->data + alloc_len - 2)); 70 71 hif = (struct hif_msg *) skb->data; 72 WARN(hif->encrypted & 0x1, "unsupported encryption type"); 73 if (hif->encrypted == 0x2) { 74 BUG(); // Not yet implemented 75 } else { > 76 le16_to_cpus(hif->len); 77 computed_len = round_up(hif->len, 2); 78 } 79 if (computed_len != read_len) { 80 dev_err(wdev->dev, "inconsistent message length: %zu != %zu\n", 81 computed_len, read_len); 82 print_hex_dump(KERN_INFO, "hif: ", DUMP_PREFIX_OFFSET, 16, 1, 83 hif, read_len, true); 84 goto err; 85 } 86 87 if (!(hif->id & HIF_ID_IS_INDICATION)) { 88 (*is_cnf)++; 89 if (hif->id == HIF_CNF_ID_MULTI_TRANSMIT) 90 release_count = le32_to_cpu(((struct hif_cnf_multi_transmit *) hif->body)->num_tx_confs); 91 else 92 release_count = 1; 93 WARN(wdev->hif.tx_buffers_used < release_count, "corrupted buffer counter"); 94 wdev->hif.tx_buffers_used -= release_count; 95 if (!wdev->hif.tx_buffers_used) 96 wake_up(&wdev->hif.tx_buffers_empty); 97 } 98 99 if (hif->id != HIF_IND_ID_EXCEPTION && hif->id != HIF_IND_ID_ERROR) { 100 if (hif->seqnum != wdev->hif.rx_seqnum) 101 dev_warn(wdev->dev, "wrong message sequence: %d != %d\n", 102 hif->seqnum, wdev->hif.rx_seqnum); 103 wdev->hif.rx_seqnum = (hif->seqnum + 1) % (HIF_COUNTER_MAX + 1); 104 } 105 106 skb_put(skb, hif->len); 107 dev_kfree_skb(skb); /* FIXME: handle received data */ 108 109 return piggyback; 110 111 err: 112 if (skb) 113 dev_kfree_skb(skb); 114 return -EIO; 115 } 116 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation