* [PATCH net-next] net: ethernet: Remove set but not used variable
@ 2020-09-18 8:39 Zheng Yongjun
2020-09-18 21:30 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Zheng Yongjun @ 2020-09-18 8:39 UTC (permalink / raw)
To: fmanlunas, sburla, dchickles, davem, kuba, netdev, linux-kernel
Cc: Zheng Yongjun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_readq:
drivers/net/ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_writeq:
drivers/net/ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
these variable is never used, so remove it.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_device.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.c b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
index ac32facaa427..fbde7c58c4db 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
@@ -1324,7 +1324,7 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr)
{
u64 val64;
unsigned long flags;
- u32 val32, addrhi;
+ u32 addrhi;
spin_lock_irqsave(&oct->pci_win_lock, flags);
@@ -1339,10 +1339,10 @@ u64 lio_pci_readq(struct octeon_device *oct, u64 addr)
writel(addrhi, oct->reg_list.pci_win_rd_addr_hi);
/* Read back to preserve ordering of writes */
- val32 = readl(oct->reg_list.pci_win_rd_addr_hi);
+ readl(oct->reg_list.pci_win_rd_addr_hi);
writel(addr & 0xffffffff, oct->reg_list.pci_win_rd_addr_lo);
- val32 = readl(oct->reg_list.pci_win_rd_addr_lo);
+ readl(oct->reg_list.pci_win_rd_addr_lo);
val64 = readq(oct->reg_list.pci_win_rd_data);
@@ -1355,7 +1355,6 @@ void lio_pci_writeq(struct octeon_device *oct,
u64 val,
u64 addr)
{
- u32 val32;
unsigned long flags;
spin_lock_irqsave(&oct->pci_win_lock, flags);
@@ -1365,7 +1364,7 @@ void lio_pci_writeq(struct octeon_device *oct,
/* The write happens when the LSB is written. So write MSB first. */
writel(val >> 32, oct->reg_list.pci_win_wr_data_hi);
/* Read the MSB to ensure ordering of writes. */
- val32 = readl(oct->reg_list.pci_win_wr_data_hi);
+ readl(oct->reg_list.pci_win_wr_data_hi);
writel(val & 0xffffffff, oct->reg_list.pci_win_wr_data_lo);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: Remove set but not used variable
2020-09-18 8:39 [PATCH net-next] net: ethernet: Remove set but not used variable Zheng Yongjun
@ 2020-09-18 21:30 ` David Miller
2020-09-19 1:31 ` 答复: " zhengyongjun
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2020-09-18 21:30 UTC (permalink / raw)
To: zhengyongjun3; +Cc: fmanlunas, sburla, dchickles, kuba, netdev, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Fri, 18 Sep 2020 16:39:38 +0800
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_readq:
> drivers/net/ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
>
> drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_writeq:
> drivers/net/ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ‘val32’ set but not used [-Wunused-but-set-variable]
>
> these variable is never used, so remove it.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
The proper subsystem prefix for these changes is just "liquidio: ".
For changes to a specific driver it is not appropriate to use
"net: ethernet: " or similar.
Please fix up your Subject line and resubmit.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
* 答复: [PATCH net-next] net: ethernet: Remove set but not used variable
2020-09-18 21:30 ` David Miller
@ 2020-09-19 1:31 ` zhengyongjun
0 siblings, 0 replies; 3+ messages in thread
From: zhengyongjun @ 2020-09-19 1:31 UTC (permalink / raw)
To: David Miller; +Cc: fmanlunas, sburla, dchickles, kuba, netdev, linux-kernel
I have fix it and send back the patch to you. Thank you very much.
-----邮件原件-----
发件人: David Miller [mailto:davem@davemloft.net]
发送时间: 2020年9月19日 5:30
收件人: zhengyongjun <zhengyongjun3@huawei.com>
抄送: fmanlunas@marvell.com; sburla@marvell.com; dchickles@marvell.com; kuba@kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org
主题: Re: [PATCH net-next] net: ethernet: Remove set but not used variable
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Fri, 18 Sep 2020 16:39:38 +0800
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_readq:
> drivers/net/ethernet/cavium/liquidio/octeon_device.c:1327:6: warning: variable ʽval32ʼ set but not used [-Wunused-but-set-variable]
>
> drivers/net/ethernet/cavium/liquidio/octeon_device.c: In function lio_pci_writeq:
> drivers/net/ethernet/cavium/liquidio/octeon_device.c:1358:6: warning: variable ʽval32ʼ set but not used [-Wunused-but-set-variable]
>
> these variable is never used, so remove it.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
The proper subsystem prefix for these changes is just "liquidio: ".
For changes to a specific driver it is not appropriate to use
"net: ethernet: " or similar.
Please fix up your Subject line and resubmit.
Thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-19 1:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 8:39 [PATCH net-next] net: ethernet: Remove set but not used variable Zheng Yongjun
2020-09-18 21:30 ` David Miller
2020-09-19 1:31 ` 答复: " zhengyongjun
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).