linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wireless: ath: remove unused-but-set parameter
@ 2023-08-14  7:32 Arnd Bergmann
  2023-08-14 14:09 ` Jeff Johnson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnd Bergmann @ 2023-08-14  7:32 UTC (permalink / raw)
  To: Kalle Valo, Jeff Johnson, Jiri Slaby, Nick Kossifidis,
	Luis Chamberlain, Toke Høiland-Jørgensen
  Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, Tom Rix,
	Aloka Dixit, Wen Gong, Ramya Gnanasekar, Karthik M,
	Aditya Kumar Singh, Muna Sinada, Johannes Berg, ath12k,
	linux-wireless, linux-kernel, llvm

From: Arnd Bergmann <arnd@arndb.de>

This has never been used since the driver was merged, but it now causes
a W=1 warning in recent clang versions

drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]

Remove the bit manipulation on the otherwise unused parameter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/ath/ath12k/mac.c         | 5 ++---
 drivers/net/wireless/ath/ath5k/mac80211-ops.c | 1 -
 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 1 -
 drivers/net/wireless/ath/ath9k/main.c         | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 91453624fd842..354ed66e6d13b 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5666,7 +5666,6 @@ static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
 
 	mutex_lock(&ar->conf_mutex);
 
-	changed_flags &= SUPPORTED_FILTERS;
 	*total_flags &= SUPPORTED_FILTERS;
 	ar->filter_flags = *total_flags;
 
@@ -5684,8 +5683,8 @@ static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
 			    "fail to set monitor filter: %d\n", ret);
 	}
 	ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
-		   "changed_flags:0x%x, total_flags:0x%x, reset_flag:%d\n",
-		   changed_flags, *total_flags, reset_flag);
+		   "total_flags:0x%x, reset_flag:%d\n",
+		   *total_flags, reset_flag);
 
 	mutex_unlock(&ar->conf_mutex);
 }
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 11ed30d6b595a..c630343ca4f9b 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -382,7 +382,6 @@ ath5k_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
 	mfilt[1] = multicast >> 32;
 
 	/* Only deal with supported flags */
-	changed_flags &= SUPPORTED_FIF_FLAGS;
 	*new_flags &= SUPPORTED_FIF_FLAGS;
 
 	/* If HW detects any phy or radar errors, leave those filters on.
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 51766de5ec3b6..6eeaa9011a168 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1264,7 +1264,6 @@ static void ath9k_htc_configure_filter(struct ieee80211_hw *hw,
 	u32 rfilt;
 
 	mutex_lock(&priv->mutex);
-	changed_flags &= SUPPORTED_FILTERS;
 	*total_flags &= SUPPORTED_FILTERS;
 
 	if (test_bit(ATH_OP_INVALID, &common->op_flags)) {
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6360d3356e256..1494feedb27db 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1571,7 +1571,6 @@ static void ath9k_configure_filter(struct ieee80211_hw *hw,
 	struct ath_chanctx *ctx;
 	u32 rfilt;
 
-	changed_flags &= SUPPORTED_FILTERS;
 	*total_flags &= SUPPORTED_FILTERS;
 
 	spin_lock_bh(&sc->chan_lock);
-- 
2.39.2


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

* Re: [PATCH] wireless: ath: remove unused-but-set parameter
  2023-08-14  7:32 [PATCH] wireless: ath: remove unused-but-set parameter Arnd Bergmann
@ 2023-08-14 14:09 ` Jeff Johnson
  2023-08-14 14:23 ` Toke Høiland-Jørgensen
  2023-08-23 14:12 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Jeff Johnson @ 2023-08-14 14:09 UTC (permalink / raw)
  To: Arnd Bergmann, Kalle Valo, Jiri Slaby, Nick Kossifidis,
	Luis Chamberlain, Toke Høiland-Jørgensen
  Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, Tom Rix,
	Aloka Dixit, Wen Gong, Ramya Gnanasekar, Karthik M,
	Aditya Kumar Singh, Muna Sinada, Johannes Berg, ath12k,
	linux-wireless, linux-kernel, llvm

On 8/14/2023 12:32 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This has never been used since the driver was merged, but it now causes
> a W=1 warning in recent clang versions
> 
> drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> 
> Remove the bit manipulation on the otherwise unused parameter.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I'm wondering if the ath12k change should be separated into its own 
patch because 1) it is the most current driver with a dedicated list, 
and 2) it actually doesn't generate a warning because changed_flags is 
used, just not in a meaningful way. But I'll let Kalle make the call on 
that when he returns from holiday.

Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>



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

* Re: [PATCH] wireless: ath: remove unused-but-set parameter
  2023-08-14  7:32 [PATCH] wireless: ath: remove unused-but-set parameter Arnd Bergmann
  2023-08-14 14:09 ` Jeff Johnson
@ 2023-08-14 14:23 ` Toke Høiland-Jørgensen
  2023-08-23 14:12 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Toke Høiland-Jørgensen @ 2023-08-14 14:23 UTC (permalink / raw)
  To: Arnd Bergmann, Kalle Valo, Jeff Johnson, Jiri Slaby,
	Nick Kossifidis, Luis Chamberlain
  Cc: Arnd Bergmann, Nathan Chancellor, Nick Desaulniers, Tom Rix,
	Aloka Dixit, Wen Gong, Ramya Gnanasekar, Karthik M,
	Aditya Kumar Singh, Muna Sinada, Johannes Berg, ath12k,
	linux-wireless, linux-kernel, llvm

Arnd Bergmann <arnd@kernel.org> writes:

> From: Arnd Bergmann <arnd@arndb.de>
>
> This has never been used since the driver was merged, but it now causes
> a W=1 warning in recent clang versions
>
> drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
>
> Remove the bit manipulation on the otherwise unused parameter.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

For ath9k:
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

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

* Re: [PATCH] wireless: ath: remove unused-but-set parameter
  2023-08-14  7:32 [PATCH] wireless: ath: remove unused-but-set parameter Arnd Bergmann
  2023-08-14 14:09 ` Jeff Johnson
  2023-08-14 14:23 ` Toke Høiland-Jørgensen
@ 2023-08-23 14:12 ` Kalle Valo
  2 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2023-08-23 14:12 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jeff Johnson, Jiri Slaby, Nick Kossifidis, Luis Chamberlain,
	Toke Høiland-Jørgensen, Arnd Bergmann,
	Nathan Chancellor, Nick Desaulniers, Tom Rix, Aloka Dixit,
	Wen Gong, Ramya Gnanasekar, Karthik M, Aditya Kumar Singh,
	Muna Sinada, Johannes Berg, ath12k, linux-wireless, linux-kernel,
	llvm

Arnd Bergmann <arnd@kernel.org> wrote:

> This has never been used since the driver was merged, but it now causes
> a W=1 warning in recent clang versions
> 
> drivers/net/wireless/ath/ath9k/main.c:1566:21: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath9k/htc_drv_main.c:1258:25: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> drivers/net/wireless/ath/ath5k/mac80211-ops.c:367:62: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
> 
> Remove the bit manipulation on the otherwise unused parameter.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

3b86f86d0f16 wifi: ath: remove unused-but-set parameter

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230814073255.1065242-1-arnd@kernel.org/

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


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

end of thread, other threads:[~2023-08-23 14:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-14  7:32 [PATCH] wireless: ath: remove unused-but-set parameter Arnd Bergmann
2023-08-14 14:09 ` Jeff Johnson
2023-08-14 14:23 ` Toke Høiland-Jørgensen
2023-08-23 14:12 ` 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).