lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1d708abb-4ab1-3af3-3952-2ebc9be33297@kernel.org>
Date:   Fri, 8 Jul 2022 08:50:18 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Tan Zhongjun <tanzhongjun@...lpad.com>, mickflemm@...il.com,
        mcgrof@...nel.org, kvalo@...nel.org, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc:     linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ath5k: Use swap() instead of open coding it

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/

> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ