wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 wifi: ath9k: remove unneeded variable from ath9k_dump_legacy_btcoex()
Fix the following coccicheck warning:
drivers/net/wireless/ath/ath9k/gpio.c:501:5-8: Unneeded variable: "len".
--- drivers/net/wireless/ath/ath9k/gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/gpio.c +1 -2
@@ -498,14 +498,13 @@ static int ath9k_dump_legacy_btcoex(struct ath_softc *sc, u8 *buf, u32 size) {struct ath_btcoex *btcoex = &sc->btcoex; -u32 len =0 ;ATH_DUMP_BTCOEX ("Stomp Type" , btcoex->bt_stomp_type);ATH_DUMP_BTCOEX ("BTCoex Period (msec)" , btcoex->btcoex_period);ATH_DUMP_BTCOEX ("Duty Cycle" , btcoex->duty_cycle);ATH_DUMP_BTCOEX ("BT Wait time" , btcoex->bt_wait_time); -return len; +return 0 ; }int ath9k_dump_btcoex (struct ath_softc *sc,u8 *buf,u32 size)
Quoted 5 lines · On Wed, 2023-06-14 at 14:13 +0800, [email protected] wrote:
Fix the following coccicheck warning:
drivers/net/wireless/ath/ath9k/gpio.c:501:5-8: Unneeded variable: "len".
Signed-off-by Mingtong Bao <[email protected]>
Same here. I'm even wondering if there are different people behind this?
Also, I'm wondering what you're up to - are you all training or something? I see the same kind of patches that are the same kind of broken from a handful of different people?
Quoted 14 lines
--- drivers/net/wireless/ath/ath9k/gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/wireless/ath/ath9k/gpio.c +0
-0@@ -498,14 +498,13 @@ static int ath9k_dump_legacy_btcoex(struct ath_softc *sc, u8 *buf, u32 size) {struct ath_btcoex *btcoex = &sc->btcoex;
drivers/net/wireless/ath/ath9k/gpio.c static int ath9k_dump_legacy_btcoex(struct · line 509
Quoted 10 lines
drivers/net/wireless/ath/ath9k/gpio.c +1
-2-u32 len =0 ;ATH_DUMP_BTCOEX ("Stomp Type" , btcoex->bt_stomp_type);ATH_DUMP_BTCOEX ("BTCoex Period (msec)" , btcoex->btcoex_period);ATH_DUMP_BTCOEX ("Duty Cycle" , btcoex->duty_cycle);ATH_DUMP_BTCOEX ("BT Wait time" , btcoex->bt_wait_time); -return len; +return 0 ;
This won't even build.
Please try to understand the code you're modifying before you do. And no, build-testing it (and fixing it) will not result anything better.
johannes