2021-11-11 05:53:02

by Seevalamuthu M (QUIC)

[permalink] [raw]
Subject: [PATCH] ath11k: Fix 'unused-but-set-parameter' error

Below compilation error is reported when built with W=1,

drivers/net/wireless/ath/ath11k/mac.c:5408:22: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]

changed_flags is set, but left unused. So, remove unnecessary set.
Compile tested only.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Seevalamuthu Mariappan <[email protected]>
---
drivers/net/wireless/ath/ath11k/mac.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 89810b2..6f3130d 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -5919,7 +5919,6 @@ static void ath11k_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;

--
2.7.4



2021-11-15 09:19:24

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] ath11k: Fix 'unused-but-set-parameter' error

Seevalamuthu Mariappan <[email protected]> wrote:

> Below compilation error is reported when built with W=1,
>
> drivers/net/wireless/ath/ath11k/mac.c:5408:22: error: parameter 'changed_flags' set but not used [-Werror,-Wunused-but-set-parameter]
>
> changed_flags is set, but left unused. So, remove unnecessary set.
> Compile tested only.
>
> Reported-by: kernel test robot <[email protected]>
> Signed-off-by: Seevalamuthu Mariappan <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

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

624e0a317030 ath11k: Fix 'unused-but-set-parameter' error

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

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