diff options
author | Guo Zhengkui <guozhengkui@vivo.com> | 2022-05-17 04:41:06 +0200 |
---|---|---|
committer | Kalle Valo <quic_kvalo@quicinc.com> | 2022-05-22 14:31:18 +0200 |
commit | 2be8afe05833c65017c8c56953f3640acfc42a40 (patch) | |
tree | 9cb917add51a3c44847864545a2ec483be949bbd /drivers/net/wireless/ath | |
parent | ath11k: Init hw_params before setting up AHB resources (diff) | |
download | linux-2be8afe05833c65017c8c56953f3640acfc42a40.tar.xz linux-2be8afe05833c65017c8c56953f3640acfc42a40.zip |
ath9k: replace ternary operator with max()
Fix the following coccicheck warning:
drivers/net/wireless/ath/ath9k/dfs.c:249:28-30: WARNING
opportunity for max()
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220517024106.77050-1-guozhengkui@vivo.com
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/dfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c b/drivers/net/wireless/ath/ath9k/dfs.c index acb9602aa464..11349218bc21 100644 --- a/drivers/net/wireless/ath/ath9k/dfs.c +++ b/drivers/net/wireless/ath/ath9k/dfs.c @@ -246,7 +246,7 @@ ath9k_postprocess_radar_event(struct ath_softc *sc, DFS_STAT_INC(sc, dc_phy_errors); /* when both are present use stronger one */ - rssi = (ard->rssi < ard->ext_rssi) ? ard->ext_rssi : ard->rssi; + rssi = max(ard->rssi, ard->ext_rssi); break; default: /* |