Commit 5024f21c authored by Masashi Honma's avatar Masashi Honma Committed by Kalle Valo

ath9k_htc: Use appropriate rs_datalen type

kernel test robot says:
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse:    expected restricted __be16 [usertype] rs_datalen
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:987:20: sparse:    got unsigned short [usertype]
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:988:13: sparse: warning: restricted __be16 degrades to integer
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c:1001:13: sparse: warning: restricted __be16 degrades to integer

Indeed rs_datalen has host byte order, so modify it's own type.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: cd486e62 ("ath9k_htc: Discard undersized packets")
Signed-off-by: default avatarMasashi Honma <masashi.honma@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200808233258.4596-1-masashi.honma@gmail.com
parent 4bad3a20
...@@ -974,7 +974,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, ...@@ -974,7 +974,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
struct ath_htc_rx_status *rxstatus; struct ath_htc_rx_status *rxstatus;
struct ath_rx_status rx_stats; struct ath_rx_status rx_stats;
bool decrypt_error = false; bool decrypt_error = false;
__be16 rs_datalen; u16 rs_datalen;
bool is_phyerr; bool is_phyerr;
if (skb->len < HTC_RX_FRAME_HEADER_SIZE) { if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment