Skip to content

Commit 2be8afe

Browse files
Guo Zhengkuikvalo
authored andcommitted
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
1 parent bebcfd2 commit 2be8afe

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/ath/ath9k

1 file changed

+1
-1
lines changed

drivers/net/wireless/ath/ath9k/dfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ ath9k_postprocess_radar_event(struct ath_softc *sc,
246246
DFS_STAT_INC(sc, dc_phy_errors);
247247

248248
/* when both are present use stronger one */
249-
rssi = (ard->rssi < ard->ext_rssi) ? ard->ext_rssi : ard->rssi;
249+
rssi = max(ard->rssi, ard->ext_rssi);
250250
break;
251251
default:
252252
/*

0 commit comments

Comments
 (0)