[staging:staging-testing 55/59] drivers/staging/wfx/data_tx.c:619:16: note: in expansion of macro 'cpu_to_le16'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   40115bbc40e2fd2de0e01ef2a28e0d09a1b5d0d1
commit: 9bca45f3d6924f19f29c0d019e961af3f41bdc9e [55/59] staging: wfx: allow to send 802.11 frames
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 9bca45f3d6924f19f29c0d019e961af3f41bdc9e
        # 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 <lkp@xxxxxxxxx>

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/net/mac80211.h:16,
                    from drivers/staging/wfx/data_tx.c:8:
   drivers/staging/wfx/hif_tx_mib.h: In function 'hif_set_mfp':
   include/uapi/linux/byteorder/big_endian.h:94:37: error: passing argument 1 of '__swab32s' from incompatible pointer type [-Werror=incompatible-pointer-types]
    #define __cpu_to_le32s(x) __swab32s((x))
                                        ^
   include/linux/byteorder/generic.h:112:22: note: in expansion of macro '__cpu_to_le32s'
    #define cpu_to_le32s __cpu_to_le32s
                         ^~~~~~~~~~~~~~
   drivers/staging/wfx/hif_tx_mib.h:139:2: note: in expansion of macro 'cpu_to_le32s'
     cpu_to_le32s(&val);
     ^~~~~~~~~~~~
   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/net/mac80211.h:16,
                    from drivers/staging/wfx/data_tx.c:8:
   include/uapi/linux/swab.h:242:29: note: expected '__u32 * {aka unsigned int *}' but argument is of type 'struct hif_mib_protected_mgmt_policy *'
    static __always_inline void __swab32s(__u32 *p)
                                ^~~~~~~~~
   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/net/mac80211.h:16,
                    from drivers/staging/wfx/data_tx.c:8:
   drivers/staging/wfx/data_tx.c: In function 'wfx_tx_inner':
   include/uapi/linux/byteorder/big_endian.h:35:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    #define __cpu_to_le16(x) ((__force __le16)__swab16((x)))
                             ^
   include/linux/byteorder/generic.h:90:21: note: in expansion of macro '__cpu_to_le16'
    #define cpu_to_le16 __cpu_to_le16
                        ^~~~~~~~~~~~~
>> drivers/staging/wfx/data_tx.c:619:16: note: in expansion of macro 'cpu_to_le16'
     hif_msg->id = cpu_to_le16(HIF_REQ_ID_TX);
                   ^~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/cpu_to_le16 +619 drivers/staging/wfx/data_tx.c

   581	
   582	static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct sk_buff *skb)
   583	{
   584		struct hif_msg *hif_msg;
   585		struct hif_req_tx *req;
   586		struct wfx_tx_priv *tx_priv;
   587		struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
   588		struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
   589		struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
   590		int queue_id = tx_info->hw_queue;
   591		size_t offset = (size_t) skb->data & 3;
   592		int wmsg_len = sizeof(struct hif_msg) + sizeof(struct hif_req_tx) + offset;
   593	
   594		WARN(queue_id >= IEEE80211_NUM_ACS, "unsupported queue_id");
   595		wfx_tx_fixup_rates(tx_info->driver_rates);
   596	
   597		// From now tx_info->control is unusable
   598		memset(tx_info->rate_driver_data, 0, sizeof(struct wfx_tx_priv));
   599		// Fill tx_priv
   600		tx_priv = (struct wfx_tx_priv *) tx_info->rate_driver_data;
   601		tx_priv->tid = wfx_tx_get_tid(hdr);
   602		tx_priv->raw_link_id = wfx_tx_get_raw_link_id(wvif, sta, hdr);
   603		tx_priv->link_id = tx_priv->raw_link_id;
   604		if (ieee80211_has_protected(hdr->frame_control))
   605			tx_priv->hw_key = hw_key;
   606		if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM)
   607			tx_priv->link_id = WFX_LINK_ID_AFTER_DTIM;
   608		if (sta && (sta->uapsd_queues & BIT(queue_id)))
   609			tx_priv->link_id = WFX_LINK_ID_UAPSD;
   610	
   611		// Fill hif_msg
   612		WARN(skb_headroom(skb) < wmsg_len, "not enough space in skb");
   613		WARN(offset & 1, "attempt to transmit an unaligned frame");
   614		skb_put(skb, wfx_tx_get_icv_len(tx_priv->hw_key));
   615		skb_push(skb, wmsg_len);
   616		memset(skb->data, 0, wmsg_len);
   617		hif_msg = (struct hif_msg *) skb->data;
   618		hif_msg->len = cpu_to_le16(skb->len);
 > 619		hif_msg->id = cpu_to_le16(HIF_REQ_ID_TX);
   620		hif_msg->interface = wvif->id;
   621		if (skb->len > wvif->wdev->hw_caps.size_inp_ch_buf) {
   622			dev_warn(wvif->wdev->dev, "requested frame size (%d) is larger than maximum supported (%d)\n",
   623				 skb->len, wvif->wdev->hw_caps.size_inp_ch_buf);
   624			skb_pull(skb, wmsg_len);
   625			return -EIO;
   626		}
   627	
   628		// Fill tx request
   629		req = (struct hif_req_tx *) hif_msg->body;
   630		req->packet_id = queue_id << 16 | IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl));
   631		req->data_flags.fc_offset = offset;
   632		req->queue_id.peer_sta_id = tx_priv->raw_link_id;
   633		// Queue index are inverted between firmware and Linux
   634		req->queue_id.queue_id = 3 - queue_id;
   635		req->ht_tx_parameters = wfx_tx_get_tx_parms(wvif->wdev, tx_info);
   636		req->tx_flags.retry_policy_index = wfx_tx_get_rate_id(wvif, tx_info);
   637	
   638		// Auxilliary operations
   639		wfx_tx_manage_pm(wvif, hdr, tx_priv, sta);
   640		wfx_tx_queue_put(wvif->wdev, &wvif->wdev->tx_queue[queue_id], skb);
   641		wfx_bh_request_tx(wvif->wdev);
   642		return 0;
   643	}
   644	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux