summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/st
diff options
context:
space:
mode:
authorKalle Valo <kvalo@kernel.org>2024-01-30 16:15:55 +0100
committerKalle Valo <kvalo@kernel.org>2024-02-05 19:16:29 +0100
commit7ceade653429c1c6af387d4039199eeae3b685c1 (patch)
tree32ee7900de8514fc221f75f3712e392fdf3507db /drivers/net/wireless/st
parentwifi: rsi: fix restricted __le32 degrades to integer sparse warnings (diff)
downloadlinux-7ceade653429c1c6af387d4039199eeae3b685c1.tar.xz
linux-7ceade653429c1c6af387d4039199eeae3b685c1.zip
wifi: cw1200: fix __le16 sparse warnings
Sparse warns: drivers/net/wireless/st/cw1200/cw1200_spi.c:83:17: got restricted __le16 [usertype] drivers/net/wireless/st/cw1200/cw1200_spi.c:148:17: warning: incorrect type in assignment (different base types) drivers/net/wireless/st/cw1200/cw1200_spi.c:148:17: expected unsigned short [addressable] [assigned] [usertype] regaddr drivers/net/wireless/st/cw1200/cw1200_spi.c:148:17: got restricted __le16 [usertype] These cpu_to_le16() calls are not really making any sense to me. On a big endian system we first convert regaddr from big to little using cpu_to_le16() but immediately after we convert them back to big endian? So just remove them. Compile tested only. Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240130151556.2315951-4-kvalo@kernel.org
Diffstat (limited to 'drivers/net/wireless/st')
-rw-r--r--drivers/net/wireless/st/cw1200/cw1200_spi.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c
index c82c0688b549..b27b57fc25bc 100644
--- a/drivers/net/wireless/st/cw1200/cw1200_spi.c
+++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c
@@ -79,9 +79,6 @@ static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self,
pr_info("READ : %04d from 0x%02x (%04x)\n", count, addr, regaddr);
#endif
- /* Header is LE16 */
- regaddr = cpu_to_le16(regaddr);
-
/* We have to byteswap if the SPI bus is limited to 8b operation
or we are running on a Big Endian system
*/
@@ -144,9 +141,6 @@ static int cw1200_spi_memcpy_toio(struct hwbus_priv *self,
pr_info("WRITE: %04d to 0x%02x (%04x)\n", count, addr, regaddr);
#endif
- /* Header is LE16 */
- regaddr = cpu_to_le16(regaddr);
-
/* We have to byteswap if the SPI bus is limited to 8b operation
or we are running on a Big Endian system
*/