diff options
author | Kalle Valo <quic_kvalo@quicinc.com> | 2024-03-20 21:24:46 +0300 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2024-03-25 13:50:41 +0300 |
commit | ed769314f55cef504e1a1fe505ef98c45185f371 (patch) | |
tree | 42eb9ec4a258020c03d7c51890e76a561ac52d10 /drivers/net/wireless/ath | |
parent | fa1a4f15bdcabb9ec8fd7d78259ef06fbb5390bc (diff) | |
download | linux-ed769314f55cef504e1a1fe505ef98c45185f371.tar.xz |
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
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_mbox.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc_pipe.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index 1963d3145481..fb5144e2d86c 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -364,8 +364,7 @@ static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags, packet->buf -= HTC_HDR_LENGTH; hdr = (struct htc_frame_hdr *)packet->buf; - /* Endianess? */ - put_unaligned((u16)packet->act_len, &hdr->payld_len); + put_unaligned_le16(packet->act_len, &hdr->payld_len); hdr->flags = flags; hdr->eid = packet->endpoint; hdr->ctrl[0] = ctrl0; diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index 9b88d96bfe96..2f2edfe43761 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c @@ -237,8 +237,7 @@ static int htc_issue_packets(struct htc_target *target, packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF; - /* Endianess? */ - put_unaligned((u16) payload_len, &htc_hdr->payld_len); + put_unaligned_le16(payload_len, &htc_hdr->payld_len); htc_hdr->flags = packet->info.tx.flags; htc_hdr->eid = (u8) packet->endpoint; htc_hdr->ctrl[0] = 0; |