tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: ce920326663b3df22c94ade99a8b234baa6ccaa5 commit: ce920326663b3df22c94ade99a8b234baa6ccaa5 [127/127] staging: vt6656: formulate rspinf values into tables reproduce: # apt-get install sparse # sparse version: git checkout ce920326663b3df22c94ade99a8b234baa6ccaa5 make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/staging/wfx/bh.c:73:35: sparse: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx/bh.c:73:35: sparse: expected restricted __le16 const [usertype] *p drivers/staging/wfx/bh.c:73:35: sparse: got unsigned short [usertype] * >> drivers/staging/wfx/bh.c:88:32: sparse: warning: restricted __le16 degrades to integer >> drivers/staging/wfx/bh.c:88:32: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:93:32: sparse: warning: cast to restricted __le16 drivers/staging/wfx/bh.c:93:32: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:121:25: sparse: warning: incorrect type in argument 2 (different base types) drivers/staging/wfx/bh.c:121:25: sparse: expected unsigned int len drivers/staging/wfx/bh.c:121:25: sparse: got restricted __le16 [usertype] len drivers/staging/wfx/bh.c:199:9: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/bh.c:221:62: sparse: warning: restricted __le16 degrades to integer -- >> drivers/staging/wfx/hif_tx_mib.c:35:38: sparse: warning: incorrect type in initializer (different base types) drivers/staging/wfx/hif_tx_mib.c:35:38: sparse: expected unsigned char [usertype] wakeup_period_max drivers/staging/wfx/hif_tx_mib.c:35:38: sparse: got restricted __le16 [usertype] -- >> drivers/staging/wfx/hif_tx.c:189:36: sparse: warning: restricted __le16 degrades to integer >> drivers/staging/wfx/hif_tx.c:199:17: sparse: warning: incorrect type in argument 3 (different base types) drivers/staging/wfx/hif_tx.c:199:17: sparse: expected unsigned long [usertype] len drivers/staging/wfx/hif_tx.c:199:17: sparse: got restricted __le16 [usertype] length -- >> drivers/staging/wfx/hif_rx.c:27:22: sparse: warning: restricted __le16 degrades to integer >> drivers/staging/wfx/hif_rx.c:83:9: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:88:29: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:130:33: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:244:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:244:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:244:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:244:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:244:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:282:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:282:21: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/hif_rx.c:310:25: sparse: warning: restricted __le16 degrades to integer -- >> drivers/staging/wfx/queue.c:191:24: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/queue.c:274:51: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/queue.c:274:51: sparse: expected unsigned int [usertype] bss_loss_confirm_id drivers/staging/wfx/queue.c:274:51: sparse: got restricted __le32 [usertype] packet_id -- >> drivers/staging/wfx/data_tx.c:383:43: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/data_tx.c:395:24: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/data_tx.c:395:24: sparse: expected restricted __le32 [usertype] packet_id drivers/staging/wfx/data_tx.c:395:24: sparse: got int >> drivers/staging/wfx/data_tx.c:497:46: sparse: warning: incorrect type in argument 2 (different base types) drivers/staging/wfx/data_tx.c:497:46: sparse: expected unsigned int [usertype] packet_id drivers/staging/wfx/data_tx.c:497:46: sparse: got restricted __le32 const [usertype] packet_id >> drivers/staging/wfx/data_tx.c:518:24: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:551:24: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:554:20: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:554:39: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:559:23: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_tx.c:568:24: sparse: warning: restricted __le32 degrades to integer -- >> drivers/staging/wfx/data_rx.c:52:16: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/data_rx.c:82:16: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/data_rx.c:93:55: sparse: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx/data_rx.c:93:55: sparse: expected int chan drivers/staging/wfx/data_rx.c:93:55: sparse: got restricted __le16 const [usertype] channel_number -- >> drivers/staging/wfx/sta.c:355:35: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/sta.c:355:35: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/sta.c:355:35: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/sta.c:355:35: sparse: warning: restricted __le32 degrades to integer drivers/staging/wfx/sta.c:613:55: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/sta.c:613:55: sparse: expected restricted __le32 [usertype] operational_rate_set drivers/staging/wfx/sta.c:613:55: sparse: got unsigned int drivers/staging/wfx/sta.c:616:55: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/sta.c:616:55: sparse: expected restricted __le32 [usertype] operational_rate_set drivers/staging/wfx/sta.c:616:55: sparse: got int drivers/staging/wfx/sta.c:627:30: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/sta.c:627:30: sparse: expected restricted __le16 [usertype] aid drivers/staging/wfx/sta.c:627:30: sparse: got unsigned short [usertype] aid drivers/staging/wfx/sta.c:657:6: sparse: warning: symbol 'wfx_enable_beacon' was not declared. Should it be static? -- >> drivers/staging/wfx/./traces.h:155:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:155:1: sparse: expected int msg_len drivers/staging/wfx/./traces.h:155:1: sparse: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:155:1: sparse: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx/./traces.h:155:1: sparse: expected restricted __le16 const [usertype] *p drivers/staging/wfx/./traces.h:155:1: sparse: got unsigned short [usertype] * drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int pkt_id drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] packet_id drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int delay_media drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] media_delay drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int delay_queue drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] tx_queue_delay >> drivers/staging/wfx/./traces.h:361:1: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/./traces.h:155:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:155:1: sparse: expected int msg_len drivers/staging/wfx/./traces.h:155:1: sparse: got restricted __le16 const [usertype] len drivers/staging/wfx/./traces.h:155:1: sparse: warning: incorrect type in argument 1 (different base types) drivers/staging/wfx/./traces.h:155:1: sparse: expected restricted __le16 const [usertype] *p drivers/staging/wfx/./traces.h:155:1: sparse: got unsigned short [usertype] * drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int pkt_id drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] packet_id drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int delay_media drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] media_delay drivers/staging/wfx/./traces.h:361:1: sparse: warning: incorrect type in assignment (different base types) drivers/staging/wfx/./traces.h:361:1: sparse: expected int delay_queue drivers/staging/wfx/./traces.h:361:1: sparse: got restricted __le32 const [usertype] tx_queue_delay >> drivers/staging/wfx/./traces.h:361:1: sparse: warning: restricted __le32 degrades to integer >> drivers/staging/wfx/debug.c:156:56: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/debug.c:157:43: sparse: warning: restricted __le16 degrades to integer drivers/staging/wfx/debug.c:237:20: sparse: warning: restricted __le16 degrades to integer vim +88 drivers/staging/wfx/bh.c b0998f0c040daf Jérôme Pouiller 2019-09-19 50 b0998f0c040daf Jérôme Pouiller 2019-09-19 51 static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) b0998f0c040daf Jérôme Pouiller 2019-09-19 52 { b0998f0c040daf Jérôme Pouiller 2019-09-19 53 struct sk_buff *skb; b0998f0c040daf Jérôme Pouiller 2019-09-19 54 struct hif_msg *hif; b0998f0c040daf Jérôme Pouiller 2019-09-19 55 size_t alloc_len; b0998f0c040daf Jérôme Pouiller 2019-09-19 56 size_t computed_len; b0998f0c040daf Jérôme Pouiller 2019-09-19 57 int release_count; b0998f0c040daf Jérôme Pouiller 2019-09-19 58 int piggyback = 0; b0998f0c040daf Jérôme Pouiller 2019-09-19 59 b5be2aa3b3ac15 Jérôme Pouiller 2019-10-08 60 WARN(read_len < 4, "corrupted read"); b0998f0c040daf Jérôme Pouiller 2019-09-19 61 WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), b0998f0c040daf Jérôme Pouiller 2019-09-19 62 "%s: request exceed WFx capability", __func__); b0998f0c040daf Jérôme Pouiller 2019-09-19 63 b0998f0c040daf Jérôme Pouiller 2019-09-19 64 // Add 2 to take into account piggyback size b0998f0c040daf Jérôme Pouiller 2019-09-19 65 alloc_len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, read_len + 2); b0998f0c040daf Jérôme Pouiller 2019-09-19 66 skb = dev_alloc_skb(alloc_len); b0998f0c040daf Jérôme Pouiller 2019-09-19 67 if (!skb) b0998f0c040daf Jérôme Pouiller 2019-09-19 68 return -ENOMEM; b0998f0c040daf Jérôme Pouiller 2019-09-19 69 b0998f0c040daf Jérôme Pouiller 2019-09-19 70 if (wfx_data_read(wdev, skb->data, alloc_len)) b0998f0c040daf Jérôme Pouiller 2019-09-19 71 goto err; b0998f0c040daf Jérôme Pouiller 2019-09-19 72 b0998f0c040daf Jérôme Pouiller 2019-09-19 73 piggyback = le16_to_cpup((u16 *)(skb->data + alloc_len - 2)); 1cc298c9152352 Jérôme Pouiller 2019-09-19 74 _trace_piggyback(piggyback, false); b0998f0c040daf Jérôme Pouiller 2019-09-19 75 b0998f0c040daf Jérôme Pouiller 2019-09-19 76 hif = (struct hif_msg *)skb->data; b0998f0c040daf Jérôme Pouiller 2019-09-19 77 WARN(hif->encrypted & 0x1, "unsupported encryption type"); b0998f0c040daf Jérôme Pouiller 2019-09-19 78 if (hif->encrypted == 0x2) { 846239f641db5a Jérôme Pouiller 2019-09-19 79 if (wfx_sl_decode(wdev, (void *)hif)) { 846239f641db5a Jérôme Pouiller 2019-09-19 80 dev_kfree_skb(skb); 846239f641db5a Jérôme Pouiller 2019-09-19 81 // If frame was a confirmation, expect trouble in next 846239f641db5a Jérôme Pouiller 2019-09-19 82 // exchange. However, it is harmless to fail to decode 846239f641db5a Jérôme Pouiller 2019-09-19 83 // an indication frame, so try to continue. Anyway, 846239f641db5a Jérôme Pouiller 2019-09-19 84 // piggyback is probably correct. 846239f641db5a Jérôme Pouiller 2019-09-19 85 return piggyback; 846239f641db5a Jérôme Pouiller 2019-09-19 86 } 6d68ac8b5b5c27 Jérôme Pouiller 2019-10-08 87 le16_to_cpus(&hif->len); 846239f641db5a Jérôme Pouiller 2019-09-19 @88 computed_len = round_up(hif->len - sizeof(hif->len), 16) 846239f641db5a Jérôme Pouiller 2019-09-19 89 + sizeof(struct hif_sl_msg) 846239f641db5a Jérôme Pouiller 2019-09-19 90 + sizeof(struct hif_sl_tag); b0998f0c040daf Jérôme Pouiller 2019-09-19 91 } else { 6d68ac8b5b5c27 Jérôme Pouiller 2019-10-08 92 le16_to_cpus(&hif->len); b0998f0c040daf Jérôme Pouiller 2019-09-19 93 computed_len = round_up(hif->len, 2); b0998f0c040daf Jérôme Pouiller 2019-09-19 94 } b0998f0c040daf Jérôme Pouiller 2019-09-19 95 if (computed_len != read_len) { b0998f0c040daf Jérôme Pouiller 2019-09-19 96 dev_err(wdev->dev, "inconsistent message length: %zu != %zu\n", b0998f0c040daf Jérôme Pouiller 2019-09-19 97 computed_len, read_len); b0998f0c040daf Jérôme Pouiller 2019-09-19 98 print_hex_dump(KERN_INFO, "hif: ", DUMP_PREFIX_OFFSET, 16, 1, b0998f0c040daf Jérôme Pouiller 2019-09-19 99 hif, read_len, true); b0998f0c040daf Jérôme Pouiller 2019-09-19 100 goto err; b0998f0c040daf Jérôme Pouiller 2019-09-19 101 } b0998f0c040daf Jérôme Pouiller 2019-09-19 102 b0998f0c040daf Jérôme Pouiller 2019-09-19 103 if (!(hif->id & HIF_ID_IS_INDICATION)) { b0998f0c040daf Jérôme Pouiller 2019-09-19 104 (*is_cnf)++; b0998f0c040daf Jérôme Pouiller 2019-09-19 105 if (hif->id == HIF_CNF_ID_MULTI_TRANSMIT) b0998f0c040daf Jérôme Pouiller 2019-09-19 106 release_count = le32_to_cpu(((struct hif_cnf_multi_transmit *)hif->body)->num_tx_confs); b0998f0c040daf Jérôme Pouiller 2019-09-19 107 else b0998f0c040daf Jérôme Pouiller 2019-09-19 108 release_count = 1; b0998f0c040daf Jérôme Pouiller 2019-09-19 109 WARN(wdev->hif.tx_buffers_used < release_count, "corrupted buffer counter"); b0998f0c040daf Jérôme Pouiller 2019-09-19 110 wdev->hif.tx_buffers_used -= release_count; b0998f0c040daf Jérôme Pouiller 2019-09-19 111 } 1cc298c9152352 Jérôme Pouiller 2019-09-19 112 _trace_hif_recv(hif, wdev->hif.tx_buffers_used); b0998f0c040daf Jérôme Pouiller 2019-09-19 113 b0998f0c040daf Jérôme Pouiller 2019-09-19 114 if (hif->id != HIF_IND_ID_EXCEPTION && hif->id != HIF_IND_ID_ERROR) { b0998f0c040daf Jérôme Pouiller 2019-09-19 115 if (hif->seqnum != wdev->hif.rx_seqnum) b0998f0c040daf Jérôme Pouiller 2019-09-19 116 dev_warn(wdev->dev, "wrong message sequence: %d != %d\n", b0998f0c040daf Jérôme Pouiller 2019-09-19 117 hif->seqnum, wdev->hif.rx_seqnum); b0998f0c040daf Jérôme Pouiller 2019-09-19 118 wdev->hif.rx_seqnum = (hif->seqnum + 1) % (HIF_COUNTER_MAX + 1); b0998f0c040daf Jérôme Pouiller 2019-09-19 119 } b0998f0c040daf Jérôme Pouiller 2019-09-19 120 b0998f0c040daf Jérôme Pouiller 2019-09-19 121 skb_put(skb, hif->len); 185c106f79bf27 Jérôme Pouiller 2019-09-19 122 // wfx_handle_rx takes care on SKB livetime 185c106f79bf27 Jérôme Pouiller 2019-09-19 123 wfx_handle_rx(wdev, skb); 7f573a6fb1d848 Jérôme Pouiller 2020-04-01 124 if (!wdev->hif.tx_buffers_used) 7f573a6fb1d848 Jérôme Pouiller 2020-04-01 125 wake_up(&wdev->hif.tx_buffers_empty); b0998f0c040daf Jérôme Pouiller 2019-09-19 126 b0998f0c040daf Jérôme Pouiller 2019-09-19 127 return piggyback; b0998f0c040daf Jérôme Pouiller 2019-09-19 128 b0998f0c040daf Jérôme Pouiller 2019-09-19 129 err: b0998f0c040daf Jérôme Pouiller 2019-09-19 130 if (skb) b0998f0c040daf Jérôme Pouiller 2019-09-19 131 dev_kfree_skb(skb); b0998f0c040daf Jérôme Pouiller 2019-09-19 132 return -EIO; b0998f0c040daf Jérôme Pouiller 2019-09-19 133 } b0998f0c040daf Jérôme Pouiller 2019-09-19 134 :::::: The code at line 88 was first introduced by commit :::::: 846239f641db5af8dd952575a65808281f2d849e staging: wfx: introduce "secure link" :::::: TO: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx> :::::: CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel