diff options
author | Mahmoud Maatuq <[email protected]> | 2023-08-15 08:08:19 +0400 |
---|---|---|
committer | Kalle Valo <[email protected]> | 2023-08-23 17:16:14 +0300 |
commit | e10ec6ea612ca54e3266996875b0742619dac20f (patch) | |
tree | 38bef5b7c3b60d32cf1a419debf0c3b822c6fb3d /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | 3b86f86d0f163454c4043a629f0ba95641d371bc (diff) |
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 <[email protected]>
Suggested-by: Jiri Slaby <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions