diff mbox series

ath: ath9k: Remove unneeded variable

Message ID 20191028204317.GA29468@saurav (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show
Series ath: ath9k: Remove unneeded variable | expand

Commit Message

Saurav Girepunje Oct. 28, 2019, 8:43 p.m. UTC
Remove "len" variable which is not used in ath9k_dump_legacy_btcoex.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 drivers/net/wireless/ath/ath9k/gpio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Kalle Valo Oct. 30, 2019, 3:18 p.m. UTC | #1
Saurav Girepunje <saurav.girepunje@gmail.com> wrote:

> Remove "len" variable which is not used in ath9k_dump_legacy_btcoex.
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

Fails to build, always compile test your patches.

In file included from drivers/net/wireless/ath/ath9k/gpio.c:17:
drivers/net/wireless/ath/ath9k/gpio.c: In function 'ath9k_dump_legacy_btcoex':
drivers/net/wireless/ath/ath9k/ath9k.h:763:3: error: 'len' undeclared (first use in this function); did you mean '_end'?
   len += scnprintf(buf + len, size - len,  \
   ^~~
drivers/net/wireless/ath/ath9k/gpio.c:502:2: note: in expansion of macro 'ATH_DUMP_BTCOEX'
  ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
  ^~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath9k/ath9k.h:763:3: note: each undeclared identifier is reported only once for each function it appears in
   len += scnprintf(buf + len, size - len,  \
   ^~~
drivers/net/wireless/ath/ath9k/gpio.c:502:2: note: in expansion of macro 'ATH_DUMP_BTCOEX'
  ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type);
  ^~~~~~~~~~~~~~~
make[5]: *** [drivers/net/wireless/ath/ath9k/gpio.o] Error 1
make[4]: *** [drivers/net/wireless/ath/ath9k] Error 2
make[3]: *** [drivers/net/wireless/ath] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2

Patch set to Rejected.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index b457e52dd365..f3d1bc02e633 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -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)