2018-10-23 03:45:40

by zhong jiang

[permalink] [raw]
Subject: [PATCH] libertas: remove set but not used variable 'int_type'

int_type is not used after setting its value. It is safe to remove
the unused variable.

Signed-off-by: zhong jiang <[email protected]>
---
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:
--
1.7.12.4



2018-10-23 14:23:26

by Lubomir Rintel

[permalink] [raw]
Subject: Re: [PATCH] libertas: remove set but not used variable 'int_type'

On Tue, 2018-10-23 at 11:32 +0800, zhong jiang wrote:
> int_type is not used after setting its value. It is safe to remove
> the unused variable.

Hi. I believe your colleague has sent an equivalent patch a few days
ago in <[email protected]>:

https://lore.kernel.org/linux-wireless/[email protected]/

Cheers,
Lubo

>
> Signed-off-by: zhong jiang <[email protected]>
> ---
> 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:


2018-10-23 14:28:25

by zhong jiang

[permalink] [raw]
Subject: Re: [PATCH] libertas: remove set but not used variable 'int_type'

On 2018/10/23 22:23, Lubomir Rintel wrote:
> On Tue, 2018-10-23 at 11:32 +0800, zhong jiang wrote:
>> int_type is not used after setting its value. It is safe to remove
>> the unused variable.
> Hi. I believe your colleague has sent an equivalent patch a few days
> ago in <[email protected]>:
>
> https://lore.kernel.org/linux-wireless/[email protected]/
I miss that. Thanks, please ignore the patch.

Sincerely,
zhong jiang
> Cheers,
> Lubo
>
>> Signed-off-by: zhong jiang <[email protected]>
>> ---
>> 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:
>
> .
>