wifi: ath11k: workaround too long expansion sparse warnings
authorKalle Valo <quic_kvalo@quicinc.com>
Thu, 14 Dec 2023 16:17:40 +0000 (18:17 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 15 Dec 2023 15:58:51 +0000 (17:58 +0200)
commitfd6ed1772b2c639370b7b41602d4c925dbd003d4
tree9fcdfd7f8ffc41b92b6da72d9a7597ad57622001
parente75fda64f0fee2599e28b123594375ccd8991507
wifi: ath11k: workaround too long expansion sparse warnings

In v6.7-rc1 sparse warns:

drivers/net/wireless/ath/ath11k/mac.c:4702:15: error: too long token expansion
drivers/net/wireless/ath/ath11k/mac.c:4702:15: error: too long token expansion
drivers/net/wireless/ath/ath11k/mac.c:8393:23: error: too long token expansion
drivers/net/wireless/ath/ath11k/mac.c:8393:23: error: too long token expansion

Workaround the warnings by refactoring the code to a new function, which also
reduces code duplication. And in the new function use max3() to make the code
more readable.

No functional changes, compile tested only.

Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20231214161740.1582340-1-kvalo@kernel.org
drivers/net/wireless/ath/ath11k/mac.c