diff mbox series

libertas: remove set but not used variable 'int_type'

Message ID 1539569795-176889-1-git-send-email-yuehaibing@huawei.com (mailing list archive)
State Accepted
Commit 937a13091cbd36d2cf1c266522f962ef6fe84bb5
Delegated to: Kalle Valo
Headers show
Series libertas: remove set but not used variable 'int_type' | expand

Commit Message

Yue Haibing Oct. 15, 2018, 2:16 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/marvell/libertas/if_spi.c: In function 'if_spi_h2c':
drivers/net/wireless/marvell/libertas/if_spi.c:799:6: warning:
 variable 'int_type' set but not used [-Wunused-but-set-variable]

It never used since introduction in
commit d2b21f191753 ("libertas: if_spi, driver for libertas GSPI devices")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/marvell/libertas/if_spi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Lubomir Rintel Oct. 23, 2018, 2:25 p.m. UTC | #1
On Mon, 2018-10-15 at 02:16 +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/marvell/libertas/if_spi.c: In function
> 'if_spi_h2c':
> drivers/net/wireless/marvell/libertas/if_spi.c:799:6: warning:
>  variable 'int_type' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in
> commit d2b21f191753 ("libertas: if_spi, driver for libertas GSPI
> devices")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Thanks.

Tested-by: Lubomir Rintel <lkundrak@v3.sk>

> ---
>  drivers/net/wireless/marvell/libertas/if_spi.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c
> b/drivers/net/wireless/marvell/libertas/if_spi.c
> index 504d6e0..7c3224b 100644
> --- a/drivers/net/wireless/marvell/libertas/if_spi.c
> +++ b/drivers/net/wireless/marvell/libertas/if_spi.c
> @@ -796,15 +796,13 @@ static void if_spi_h2c(struct if_spi_card
> *card,
>  {
>  	struct lbs_private *priv = card->priv;
>  	int err = 0;
> -	u16 int_type, port_reg;
> +	u16 port_reg;
>  
>  	switch (type) {
>  	case MVMS_DAT:
> -		int_type = IF_SPI_CIC_TX_DOWNLOAD_OVER;
>  		port_reg = IF_SPI_DATA_RDWRPORT_REG;
>  		break;
>  	case MVMS_CMD:
> -		int_type = IF_SPI_CIC_CMD_DOWNLOAD_OVER;
>  		port_reg = IF_SPI_CMD_RDWRPORT_REG;
>  		break;
>  	default:
>
Kalle Valo Nov. 6, 2018, 4:52 p.m. UTC | #2
YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/marvell/libertas/if_spi.c: In function 'if_spi_h2c':
> drivers/net/wireless/marvell/libertas/if_spi.c:799:6: warning:
>  variable 'int_type' set but not used [-Wunused-but-set-variable]
> 
> It never used since introduction in
> commit d2b21f191753 ("libertas: if_spi, driver for libertas GSPI devices")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Tested-by: Lubomir Rintel <lkundrak@v3.sk>

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

937a13091cbd libertas: remove set but not used variable 'int_type'
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/libertas/if_spi.c b/drivers/net/wireless/marvell/libertas/if_spi.c
index 504d6e0..7c3224b 100644
--- a/drivers/net/wireless/marvell/libertas/if_spi.c
+++ b/drivers/net/wireless/marvell/libertas/if_spi.c
@@ -796,15 +796,13 @@  static void if_spi_h2c(struct if_spi_card *card,
 {
 	struct lbs_private *priv = card->priv;
 	int err = 0;
-	u16 int_type, port_reg;
+	u16 port_reg;
 
 	switch (type) {
 	case MVMS_DAT:
-		int_type = IF_SPI_CIC_TX_DOWNLOAD_OVER;
 		port_reg = IF_SPI_DATA_RDWRPORT_REG;
 		break;
 	case MVMS_CMD:
-		int_type = IF_SPI_CIC_CMD_DOWNLOAD_OVER;
 		port_reg = IF_SPI_CMD_RDWRPORT_REG;
 		break;
 	default: