netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: remove redundant pointer rf
@ 2018-07-09 12:41 Colin King
  2018-07-30 17:56 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-07-09 12:41 UTC (permalink / raw)
  To: Jiri Slaby, Nick Kossifidis, Luis R . Rodriguez, Kalle Valo,
	David S . Miller, linux-wireless, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer rf is being assigned but is never used hence it is redundant
and can be removed.

Cleans up two clang warnings:
warning: variable 'rf' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/ath/ath5k/phy.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index b1b8bc326830..ae08572c4b58 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -483,7 +483,6 @@ static u32
 ath5k_hw_rf_gainf_corr(struct ath5k_hw *ah)
 {
 	u32 mix, step;
-	u32 *rf;
 	const struct ath5k_gain_opt *go;
 	const struct ath5k_gain_opt_step *g_step;
 	const struct ath5k_rf_reg *rf_regs;
@@ -502,7 +501,6 @@ ath5k_hw_rf_gainf_corr(struct ath5k_hw *ah)
 	if (ah->ah_rf_banks == NULL)
 		return 0;
 
-	rf = ah->ah_rf_banks;
 	ah->ah_gain.g_f_corr = 0;
 
 	/* No VGA (Variable Gain Amplifier) override, skip */
@@ -549,13 +547,10 @@ ath5k_hw_rf_check_gainf_readback(struct ath5k_hw *ah)
 {
 	const struct ath5k_rf_reg *rf_regs;
 	u32 step, mix_ovr, level[4];
-	u32 *rf;
 
 	if (ah->ah_rf_banks == NULL)
 		return false;
 
-	rf = ah->ah_rf_banks;
-
 	if (ah->ah_radio == AR5K_RF5111) {
 
 		rf_regs = rf_regs_5111;
-- 
2.17.1

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

* Re: [PATCH] ath5k: remove redundant pointer rf
  2018-07-09 12:41 [PATCH] ath5k: remove redundant pointer rf Colin King
@ 2018-07-30 17:56 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-07-30 17:56 UTC (permalink / raw)
  To: Colin King
  Cc: Jiri Slaby, Nick Kossifidis, Luis R . Rodriguez, David S . Miller,
	linux-wireless, netdev, kernel-janitors, linux-kernel

Colin King <colin.king@canonical.com> wrote:

> Pointer rf is being assigned but is never used hence it is redundant
> and can be removed.
> 
> Cleans up two clang warnings:
> warning: variable 'rf' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

e8c38062efc6 ath5k: remove redundant pointer rf

-- 
https://patchwork.kernel.org/patch/10514529/

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

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

end of thread, other threads:[~2018-07-30 17:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-09 12:41 [PATCH] ath5k: remove redundant pointer rf Colin King
2018-07-30 17:56 ` 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).