mirror_ubuntu-kernels/drivers/net/wireless/ath
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
..
ar5523 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2022-10-29 08:25:50 +03:00
ath5k wifi: ath5k: ath5k_hw_get_median_noise_floor(): use swap() 2023-08-23 17:16:14 +03:00
ath6kl wireless-next patches for v6.6 2023-08-04 18:34:25 -07:00
ath9k wifi: ath: remove unused-but-set parameter 2023-08-23 17:12:09 +03:00
ath10k wifi: ath10k: fix Wvoid-pointer-to-enum-cast warning 2023-08-23 17:10:04 +03:00
ath11k wifi: ath11k: Remove unused declarations 2023-08-23 17:10:45 +03:00
ath12k wifi: ath: remove unused-but-set parameter 2023-08-23 17:12:09 +03:00
carl9170 wifi: carl9170: Replace fake flex-array with flexible-array member 2023-03-24 16:54:01 +02:00
wcn36xx wifi: drivers: Explicitly include correct DT includes 2023-08-01 17:48:38 +03:00
wil6210 wifi: wil6210: fix fortify warnings 2023-07-27 19:12:49 +03:00
ath.h wifi: ath: Silence memcpy run-time false positive warning 2023-02-17 18:24:16 +02:00
debug.c
dfs_pattern_detector.c ath: dfs_pattern_detector: Avoid open coded arithmetic in memory allocation 2022-01-17 14:41:51 +02:00
dfs_pattern_detector.h
dfs_pri_detector.c
dfs_pri_detector.h
hw.c wifi: ath: fix repeated words in comments 2022-07-18 13:04:50 +03:00
Kconfig wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices 2022-11-29 12:49:06 +02:00
key.c wifi: ath: Silence memcpy run-time false positive warning 2023-02-17 18:24:16 +02:00
main.c
Makefile wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices 2022-11-29 12:49:06 +02:00
reg.h
regd_common.h ath: regdom: extend South Korea regulatory domain support 2021-12-08 10:37:38 +02:00
regd.c Revert "ath: add support for special 0x0 regulatory domain" 2022-03-07 19:45:08 +02:00
regd.h ath: regdom: extend South Korea regulatory domain support 2021-12-08 10:37:38 +02:00
spectral_common.h ath: Replace zero-length arrays with flexible-array members 2022-02-21 12:26:28 +02:00
trace.c
trace.h tracing/ath: Use the new __vstring() helper 2022-07-15 17:44:40 -04:00