Skip to content
Commit e5f6c85a authored by Kalle Valo's avatar Kalle Valo
Browse files

wifi: ath9k: ath9k_set_moredata(): fix sparse warnings



Sparse warns:

drivers/net/wireless/ath/ath9k/xmit.c:1677:20: warning: incorrect type in initializer (different base types)
drivers/net/wireless/ath/ath9k/xmit.c:1677:20:    expected unsigned short [usertype] mask
drivers/net/wireless/ath/ath9k/xmit.c:1677:20:    got restricted __le16 [usertype]
drivers/net/wireless/ath/ath9k/xmit.c:1681:17: warning: restricted __le16 degrades to integer
drivers/net/wireless/ath/ath9k/xmit.c:1682:42: warning: restricted __le16 degrades to integer
drivers/net/wireless/ath/ath9k/xmit.c:1682:36: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/xmit.c:1682:36:    expected restricted __le16 [usertype] frame_control
drivers/net/wireless/ath/ath9k/xmit.c:1682:36:    got int

Fix ath9k_set_moredata() to use __le16 with masks and use if statement instead
of multiply operator.

Compile tested only.

Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Acked-by: default avatarToke Høiland-Jørgensen <toke@toke.dk>
Link: https://msgid.link/20240320170656.3534265-2-kvalo@kernel.org
parent 1f4672fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment