* [PATCH net-next] liquidio: remove set but not used variable 's'
[not found] <20200306023254.61731-1-yuehaibing@huawei.com>
@ 2020-03-19 12:07 ` YueHaibing
2020-03-19 12:10 ` Leon Romanovsky
2020-03-20 4:00 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: YueHaibing @ 2020-03-19 12:07 UTC (permalink / raw)
To: Derek Chickles, Leon Romanovsky, David S . Miller,
Satanand Burla, Felix Manlunas
Cc: YueHaibing, netdev, linux-kernel, kernel-janitors, Hulk Robot
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_chip_specific_setup':
drivers/net/ethernet/cavium/liquidio/lio_main.c:1378:8: warning:
variable 's' set but not used [-Wunused-but-set-variable]
It's not used since commit b6334be64d6f ("net/liquidio: Delete driver version assignment")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index a8d9ec927627..66d31c018c7e 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1375,7 +1375,6 @@ static int octeon_chip_specific_setup(struct octeon_device *oct)
{
u32 dev_id, rev_id;
int ret = 1;
- char *s;
pci_read_config_dword(oct->pci_dev, 0, &dev_id);
pci_read_config_dword(oct->pci_dev, 8, &rev_id);
@@ -1385,13 +1384,11 @@ static int octeon_chip_specific_setup(struct octeon_device *oct)
case OCTEON_CN68XX_PCIID:
oct->chip_id = OCTEON_CN68XX;
ret = lio_setup_cn68xx_octeon_device(oct);
- s = "CN68XX";
break;
case OCTEON_CN66XX_PCIID:
oct->chip_id = OCTEON_CN66XX;
ret = lio_setup_cn66xx_octeon_device(oct);
- s = "CN66XX";
break;
case OCTEON_CN23XX_PCIID_PF:
@@ -1404,11 +1401,9 @@ static int octeon_chip_specific_setup(struct octeon_device *oct)
pci_sriov_set_totalvfs(oct->pci_dev,
oct->sriov_info.max_vfs);
#endif
- s = "CN23XX";
break;
default:
- s = "?";
dev_err(&oct->pci_dev->dev, "Unknown device found (dev_id: %x)\n",
dev_id);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] liquidio: remove set but not used variable 's'
2020-03-19 12:07 ` [PATCH net-next] liquidio: remove set but not used variable 's' YueHaibing
@ 2020-03-19 12:10 ` Leon Romanovsky
2020-03-20 13:14 ` Dan Carpenter
2020-03-20 4:00 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2020-03-19 12:10 UTC (permalink / raw)
To: YueHaibing
Cc: Derek Chickles, David S . Miller, Satanand Burla, Felix Manlunas,
netdev, linux-kernel, kernel-janitors, Hulk Robot
On Thu, Mar 19, 2020 at 12:07:43PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_chip_specific_setup':
> drivers/net/ethernet/cavium/liquidio/lio_main.c:1378:8: warning:
> variable 's' set but not used [-Wunused-but-set-variable]
>
> It's not used since commit b6334be64d6f ("net/liquidio: Delete driver version assignment")
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
I'm sorry for missing this warning.
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] liquidio: remove set but not used variable 's'
2020-03-19 12:07 ` [PATCH net-next] liquidio: remove set but not used variable 's' YueHaibing
2020-03-19 12:10 ` Leon Romanovsky
@ 2020-03-20 4:00 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2020-03-20 4:00 UTC (permalink / raw)
To: yuehaibing
Cc: dchickles, leonro, sburla, fmanlunas, netdev, linux-kernel,
kernel-janitors, hulkci
From: YueHaibing <yuehaibing@huawei.com>
Date: Thu, 19 Mar 2020 12:07:43 +0000
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_chip_specific_setup':
> drivers/net/ethernet/cavium/liquidio/lio_main.c:1378:8: warning:
> variable 's' set but not used [-Wunused-but-set-variable]
>
> It's not used since commit b6334be64d6f ("net/liquidio: Delete driver version assignment")
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] liquidio: remove set but not used variable 's'
2020-03-19 12:10 ` Leon Romanovsky
@ 2020-03-20 13:14 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-03-20 13:14 UTC (permalink / raw)
To: Leon Romanovsky
Cc: YueHaibing, Derek Chickles, David S . Miller, Satanand Burla,
Felix Manlunas, netdev, linux-kernel, kernel-janitors,
Hulk Robot
On Thu, Mar 19, 2020 at 02:10:35PM +0200, Leon Romanovsky wrote:
> On Thu, Mar 19, 2020 at 12:07:43PM +0000, YueHaibing wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > drivers/net/ethernet/cavium/liquidio/lio_main.c: In function 'octeon_chip_specific_setup':
> > drivers/net/ethernet/cavium/liquidio/lio_main.c:1378:8: warning:
> > variable 's' set but not used [-Wunused-but-set-variable]
> >
> > It's not used since commit b6334be64d6f ("net/liquidio: Delete driver version assignment")
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> > drivers/net/ethernet/cavium/liquidio/lio_main.c | 5 -----
> > 1 file changed, 5 deletions(-)
> >
>
> I'm sorry for missing this warning.
>
The warning is not enabled by default.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-20 13:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20200306023254.61731-1-yuehaibing@huawei.com>
2020-03-19 12:07 ` [PATCH net-next] liquidio: remove set but not used variable 's' YueHaibing
2020-03-19 12:10 ` Leon Romanovsky
2020-03-20 13:14 ` Dan Carpenter
2020-03-20 4:00 ` David Miller
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).