From: Yang Guang <yang.guang5@xxxxxxxxxx> Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid opencoding it. Reported-by: Zeal Robot <zealci@xxxxxxxxxx> Signed-off-by: Yang Guang <yang.guang5@xxxxxxxxxx> Signed-off-by: David Yang <davidcomponentone@xxxxxxxxx> --- drivers/net/wireless/ath/ath9k/calib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 0422a33395b7..daf88330e13b 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c @@ -33,9 +33,7 @@ static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer) for (i = 0; i < ATH9K_NF_CAL_HIST_MAX - 1; i++) { for (j = 1; j < ATH9K_NF_CAL_HIST_MAX - i; j++) { if (sort[j] > sort[j - 1]) { - nfval = sort[j]; - sort[j] = sort[j - 1]; - sort[j - 1] = nfval; + swap(sort[j], sort[j - 1]); } } } -- 2.30.2