1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/wireless/ath/ath5k
Mahmoud Maatuq e10ec6ea61 wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap()
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@gmail.com>
Suggested-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230815040819.649455-1-mahmoudmatook.mm@gmail.com
2023-08-23 17:16:14 +03:00
..
ahb.c wifi: ath5k: Remove redundant dev_err() 2023-08-22 16:32:52 +03:00
ani.c ath5k: remove conversion to bool in ath5k_ani_calibration() 2020-04-28 12:11:27 +03:00
ani.h ath5k: Cleanups v2 + add kerneldoc on all hw functions 2011-11-28 14:44:16 -05:00
ath5k.h ath5k: remove unused ah_txq_isr_txurn member from struct ath5k_hw 2022-01-17 14:38:26 +02:00
attach.c ath: Remove unnecessary ath_bcast_mac and use eth_broadcast_addr 2018-03-29 12:10:26 +03:00
base.c wifi: ath5k: fix repeated words in comments 2022-07-18 13:03:43 +03:00
base.h ath5k: enable support for 5 MHz and 10 MHz channels 2013-08-16 14:17:50 -04:00
caps.c ath5k: MRR support and 2GHz radio override belong in ah_capabilities 2011-11-28 14:44:19 -05:00
debug.c wifi: ath5k: remove phydir check from ath5k_debug_init_device() 2023-07-25 17:30:03 +03:00
debug.h
desc.c locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
desc.h ath5k: Cleanups v2 + add kerneldoc on all hw functions 2011-11-28 14:44:16 -05:00
dma.c ath5k: fix ah_txq_isr_txok_all setting 2022-01-17 14:38:27 +02:00
eeprom.c wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list() 2023-02-22 11:56:30 +02:00
eeprom.h ath5k: cleanup channel to eprom_mode function 2013-03-06 16:24:27 -05:00
gpio.c ath5k: Cleanups v2 + add kerneldoc on all hw functions 2011-11-28 14:44:16 -05:00
initvals.c ath: Add and use pr_fmt, convert printks to pr_<level> 2012-04-10 14:52:13 -04:00
Kconfig ath5k: fix building with LEDS=m 2021-09-24 14:08:10 +03:00
led.c ath5k: fix building with LEDS=m 2021-09-24 14:08:10 +03:00
mac80211-ops.c wifi: ath: remove unused-but-set parameter 2023-08-23 17:12:09 +03:00
Makefile ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
pci.c ath: switch from 'pci_' to 'dma_' API 2021-07-02 14:39:59 +03:00
pcu.c ath5k: Fix wrong function name in comments 2021-06-15 17:01:24 +03:00
phy.c wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap() 2023-08-23 17:16:14 +03:00
qcu.c ath5k: remove duplicated re-assignment to pointer 'tq' 2018-02-27 18:45:48 +02:00
reg.h
reset.c ath5k: Use fallthrough pseudo-keyword 2020-08-17 13:19:33 +03:00
rfbuffer.h ath5k: Replace HTTP links with HTTPS ones 2020-08-14 18:06:36 +03:00
rfgain.h ath5k: Cleanups v2 + add kerneldoc on all hw functions 2011-11-28 14:44:16 -05:00
rfkill.c ath5k: convert tasklets to use new tasklet_setup() API 2020-08-27 13:15:25 +03:00
sysfs.c ath5k: replace snprintf in show functions with sysfs_emit 2021-10-18 15:33:42 +03:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00