wifi: ath6kl: fix sparse warnings
authorKalle Valo <quic_kvalo@quicinc.com>
Wed, 20 Mar 2024 18:24:46 +0000 (20:24 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Mon, 25 Mar 2024 10:50:41 +0000 (12:50 +0200)
commited769314f55cef504e1a1fe505ef98c45185f371
tree42eb9ec4a258020c03d7c51890e76a561ac52d10
parentfa1a4f15bdcabb9ec8fd7d78259ef06fbb5390bc
wifi: ath6kl: fix sparse warnings

Sparse warns:

drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17:    expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17:    got unsigned short [usertype]
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9:    expected restricted __le16 x
drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9:    got unsigned short [usertype]

Use put_unaligned_le16() so that the value is converted to little endian before
storing it to the header.

Compile tested only.

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240320182449.3757215-2-kvalo@kernel.org
drivers/net/wireless/ath/ath6kl/htc_mbox.c
drivers/net/wireless/ath/ath6kl/htc_pipe.c