• Kalle Valo's avatar
    wifi: cw1200: fix __le16 sparse warnings · 7ceade65
    Kalle Valo authored
    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: default avatarKalle Valo <kvalo@kernel.org>
    Link: https://msgid.link/20240130151556.2315951-4-kvalo@kernel.org
    7ceade65
cw1200_spi.c 10.3 KB