Re: [PATCH] ath5k: Use swap() instead of open coding it

From: Jiri Slaby
Date: Fri Jul 08 2022 - 02:50:26 EST


On 04. 07. 22, 15:06, Tan Zhongjun wrote:
Use swap() instead of open coding it.

This still holds:
https://lore.kernel.org/all/0c3acbd4-6ab2-5cc5-6293-54e30093cce2@xxxxxxxxxx/

Signed-off-by: Tan Zhongjun

This is a wrong S-O-B line.

---
drivers/net/wireless/ath/ath5k/phy.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 5797ef9c73d7..c2cf4b79dd95 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1569,9 +1569,7 @@ ath5k_hw_get_median_noise_floor(struct ath5k_hw *ah)
for (i = 0; i < ATH5K_NF_CAL_HIST_MAX - 1; i++) {
for (j = 1; j < ATH5K_NF_CAL_HIST_MAX - i; j++) {
if (sort[j] > sort[j - 1]) {
- tmp = sort[j];
- sort[j] = sort[j - 1];
- sort[j - 1] = tmp;
+ swap(sort[j], sort[j - 1]);
}
}
}
--
2.29.0



--
js