Search Linux Wireless

Re: [PATCH v2] ath5k: fix WARNING opportunity for swap.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mahmoud Maatuq <mahmoudmatook.mm@xxxxxxxxx> wrote:

> coccinielle reported the following:
> ./drivers/net/wireless/ath/ath5k/phy.c:1573:25-26: WARNING opportunity for swap()
> 
> while trying to fix the above warning, it reveals that ath5k_hw_get_median_noise_floor()
> had open-coded sort() functionality. Since ath5k_hw_get_median_noise_floor() only
> executes once every 10 seconds, any extra overhead due to sort() calling
> its "compare" and "swap" functions can be ignored, so replace the
> existing logic with a call to sort().
> 
> Signed-off-by: Mahmoud Maatuq <mahmoudmatook.mm@xxxxxxxxx>
> Suggested-by: Jiri Slaby <jirislaby@xxxxxxxxxx>
> Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>

Patch applied to ath-next branch of ath.git, thanks.

e10ec6ea612c wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230815040819.649455-1-mahmoudmatook.mm@xxxxxxxxx/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux