Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ath11k: Mark two variables as __maybe_unused
@ 2020-09-01  3:56 YueHaibing
  2020-09-21 13:31 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-09-01  3:56 UTC (permalink / raw)
  To: kvalo, davem, kuba
  Cc: ath11k, linux-wireless, netdev, linux-kernel, YueHaibing

Fix -Wunused-variable warnings:

drivers/net/wireless/ath/ath11k/debug.c:36:20: warning: ‘htt_bp_lmac_ring’ defined but not used [-Wunused-variable]
drivers/net/wireless/ath/ath11k/debug.c:15:20: warning: ‘htt_bp_umac_ring’ defined but not used [-Wunused-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/ath/ath11k/debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c
index 0a3cfa716390..0b7842e8cc58 100644
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -12,7 +12,7 @@
 #include "debug_htt_stats.h"
 #include "peer.h"
 
-static const char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = {
+static const __maybe_unused char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = {
 	"REO2SW1_RING",
 	"REO2SW2_RING",
 	"REO2SW3_RING",
@@ -33,7 +33,7 @@ static const char *htt_bp_umac_ring[HTT_SW_UMAC_RING_IDX_MAX] = {
 	"REO_STATUS_RING",
 };
 
-static const char *htt_bp_lmac_ring[HTT_SW_LMAC_RING_IDX_MAX] = {
+static const __maybe_unused char *htt_bp_lmac_ring[HTT_SW_LMAC_RING_IDX_MAX] = {
 	"FW2RXDMA_BUF_RING",
 	"FW2RXDMA_STATUS_RING",
 	"FW2RXDMA_LINK_RING",
-- 
2.17.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath11k: Mark two variables as __maybe_unused
  2020-09-01  3:56 [PATCH] ath11k: Mark two variables as __maybe_unused YueHaibing
@ 2020-09-21 13:31 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-09-21 13:31 UTC (permalink / raw)
  To: YueHaibing; +Cc: davem, kuba, netdev, linux-wireless, ath11k, linux-kernel

YueHaibing <yuehaibing@huawei.com> writes:

> Fix -Wunused-variable warnings:
>
> drivers/net/wireless/ath/ath11k/debug.c:36:20: warning: ‘htt_bp_lmac_ring’ defined but not used [-Wunused-variable]
> drivers/net/wireless/ath/ath11k/debug.c:15:20: warning: ‘htt_bp_umac_ring’ defined but not used [-Wunused-variable]
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

I don't like __maybe_unused so I decided to fix this with some refactoring:

[1/4] ath11k: refactor debugfs code into debugfs.c
https://patchwork.kernel.org/patch/11781017/

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-21 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01  3:56 [PATCH] ath11k: Mark two variables as __maybe_unused YueHaibing
2020-09-21 13:31 ` 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).