* [PATCH] ath9k: remove unneeded variable
@ 2019-09-10 9:55 Ding Xiang
2019-09-17 6:41 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Ding Xiang @ 2019-09-10 9:55 UTC (permalink / raw)
To: kvalo, davem; +Cc: linux-wireless, netdev, linux-kernel
"len" is unneeded,just return 0
Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
---
drivers/net/wireless/ath/ath9k/gpio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index b457e52..f3d1bc0 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)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath9k: remove unneeded variable
2019-09-10 9:55 [PATCH] ath9k: remove unneeded variable Ding Xiang
@ 2019-09-17 6:41 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-09-17 6:41 UTC (permalink / raw)
To: Ding Xiang; +Cc: davem, linux-wireless, netdev, linux-kernel
Ding Xiang <dingxiang@cmss.chinamobile.com> wrote:
> "len" is unneeded,just return 0
>
> Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
ALWAYS build check your patches! I admit that ATH_DUMP_BTCOEX() is an
evil macro as it uses len variable in secret, but if you had compiled
your patch you would have noticed this immeadiately.
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
--
https://patchwork.kernel.org/patch/11139147/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-17 6:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 9:55 [PATCH] ath9k: remove unneeded variable Ding Xiang
2019-09-17 6:41 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).