Thread (1 message) 1 message, 1 author, 2022-07-08

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

From: Jiri Slaby <jirislaby@kernel.org>
Date: 2022-07-08 06:50:26
Also in: linux-wireless, lkml

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@kernel.org/ (local)
Signed-off-by: Tan Zhongjun
This is a wrong S-O-B line.
quoted hunk
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help