* [PATCH net-next] net: bna: Remove unused variable 't'
@ 2020-07-17 10:23 Zhang Changzhong
2020-07-18 1:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Changzhong @ 2020-07-17 10:23 UTC (permalink / raw)
To: rmody, skalluru, GR-Linux-NIC-Dev, davem, kuba; +Cc: netdev, linux-kernel
Gcc report warning as follows:
drivers/net/ethernet/brocade/bna/bfa_ioc.c:1538:6: warning:
variable 't' set but not used [-Wunused-but-set-variable]
1538 | u32 t;
| ^
After commit c107ba171f3d ("bna: Firmware Patch Simplification"),
't' is never used, so removing it to avoid build warning.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
drivers/net/ethernet/brocade/bna/bfa_ioc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index e17bfc8..49358d4 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -1535,7 +1535,6 @@ enum bfa_flash_err {
bfa_flash_fifo_flush(void __iomem *pci_bar)
{
u32 i;
- u32 t;
union bfa_flash_dev_status_reg dev_status;
dev_status.i = readl(pci_bar + FLI_DEV_STATUS_REG);
@@ -1545,7 +1544,7 @@ enum bfa_flash_err {
/* fifo counter in terms of words */
for (i = 0; i < dev_status.r.fifo_cnt; i++)
- t = readl(pci_bar + FLI_RDDATA_REG);
+ readl(pci_bar + FLI_RDDATA_REG);
/* Check the device status. It may take some time. */
for (i = 0; i < BFA_FLASH_CHECK_MAX; i++) {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: bna: Remove unused variable 't'
2020-07-17 10:23 [PATCH net-next] net: bna: Remove unused variable 't' Zhang Changzhong
@ 2020-07-18 1:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-18 1:43 UTC (permalink / raw)
To: zhangchangzhong
Cc: rmody, skalluru, GR-Linux-NIC-Dev, kuba, netdev, linux-kernel
From: Zhang Changzhong <zhangchangzhong@huawei.com>
Date: Fri, 17 Jul 2020 18:23:04 +0800
> Gcc report warning as follows:
>
> drivers/net/ethernet/brocade/bna/bfa_ioc.c:1538:6: warning:
> variable 't' set but not used [-Wunused-but-set-variable]
> 1538 | u32 t;
> | ^
>
> After commit c107ba171f3d ("bna: Firmware Patch Simplification"),
> 't' is never used, so removing it to avoid build warning.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-18 1:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17 10:23 [PATCH net-next] net: bna: Remove unused variable 't' Zhang Changzhong
2020-07-18 1:43 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.