linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup()
@ 2021-11-15 10:28 Ajay.Kathat
  2021-11-26 16:33 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Ajay.Kathat @ 2021-11-15 10:28 UTC (permalink / raw)
  To: linux-wireless; +Cc: Claudiu.Beznea, kvalo, Ajay.Kathat, lkp

From: Ajay Singh <ajay.kathat@microchip.com>

Remove unused variables to avoid the below warnings:

   drivers/net/wireless/microchip/wilc1000/wlan.c: In function 'chip_wakeup':
>> drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used [-Wunused-but-set-variable]
     620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
         |                                  ^~~~~~~~~~~~~~~~~~~
>> drivers/net/wireless/microchip/wilc1000/wlan.c:620:13: warning: variable 'to_host_from_fw_reg' set but not used [-Wunused-but-set-variable]
     620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
         |             ^~~~~~~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index ea81ef120fd1..82566544419a 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -626,7 +626,6 @@ void chip_wakeup(struct wilc *wilc)
 	u32 clk_status_val = 0, trials = 0;
 	u32 wakeup_reg, wakeup_bit;
 	u32 clk_status_reg, clk_status_bit;
-	u32 to_host_from_fw_reg, to_host_from_fw_bit;
 	u32 from_host_to_fw_reg, from_host_to_fw_bit;
 	const struct wilc_hif_func *hif_func = wilc->hif_func;
 
@@ -637,8 +636,6 @@ void chip_wakeup(struct wilc *wilc)
 		clk_status_bit = WILC_SDIO_CLK_STATUS_BIT;
 		from_host_to_fw_reg = WILC_SDIO_HOST_TO_FW_REG;
 		from_host_to_fw_bit = WILC_SDIO_HOST_TO_FW_BIT;
-		to_host_from_fw_reg = WILC_SDIO_FW_TO_HOST_REG;
-		to_host_from_fw_bit = WILC_SDIO_FW_TO_HOST_BIT;
 	} else {
 		wakeup_reg = WILC_SPI_WAKEUP_REG;
 		wakeup_bit = WILC_SPI_WAKEUP_BIT;
@@ -646,8 +643,6 @@ void chip_wakeup(struct wilc *wilc)
 		clk_status_bit = WILC_SPI_CLK_STATUS_BIT;
 		from_host_to_fw_reg = WILC_SPI_HOST_TO_FW_REG;
 		from_host_to_fw_bit = WILC_SPI_HOST_TO_FW_BIT;
-		to_host_from_fw_reg = WILC_SPI_FW_TO_HOST_REG;
-		to_host_from_fw_bit = WILC_SPI_FW_TO_HOST_BIT;
 	}
 
 	/* indicate host wakeup */
-- 
2.25.1

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

* Re: [PATCH] wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup()
  2021-11-15 10:28 [PATCH] wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup() Ajay.Kathat
@ 2021-11-26 16:33 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-11-26 16:33 UTC (permalink / raw)
  To: Ajay.Kathat; +Cc: linux-wireless, Claudiu.Beznea, Ajay.Kathat, lkp

<Ajay.Kathat@microchip.com> wrote:

> From: Ajay Singh <ajay.kathat@microchip.com>
> 
> Remove unused variables to avoid the below warnings:
> 
>    drivers/net/wireless/microchip/wilc1000/wlan.c: In function 'chip_wakeup':
> >> drivers/net/wireless/microchip/wilc1000/wlan.c:620:34: warning: variable 'to_host_from_fw_bit' set but not used [-Wunused-but-set-variable]
>      620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
>          |                                  ^~~~~~~~~~~~~~~~~~~
> >> drivers/net/wireless/microchip/wilc1000/wlan.c:620:13: warning: variable 'to_host_from_fw_reg' set but not used [-Wunused-but-set-variable]
>      620 |         u32 to_host_from_fw_reg, to_host_from_fw_bit;
>          |             ^~~~~~~~~~~~~~~~~~~
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>

Patch applied to wireless-drivers-next.git, thanks.

d1e69b5492d1 wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20211115102809.1408267-1-ajay.kathat@microchip.com/

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


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

end of thread, other threads:[~2021-11-26 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 10:28 [PATCH] wilc1000: remove '-Wunused-but-set-variable' warning in chip_wakeup() Ajay.Kathat
2021-11-26 16:33 ` 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).