All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bna: remove set but not used variable 'pgoff'
@ 2020-01-03 12:04 yu kuai
  2020-01-03 20:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: yu kuai @ 2020-01-03 12:04 UTC (permalink / raw)
  To: rmody, skalluru, GR-Linux-NIC-Dev, davem
  Cc: netdev, linux-kernel, yukuai3, yi.zhang, zhengbin13

drivers/net/ethernet/brocade/bna/bfa_ioc.c: In function
‘bfa_ioc_fwver_clear’:
drivers/net/ethernet/brocade/bna/bfa_ioc.c:1127:13: warning: variable
‘pgoff’ set but not used [-Wunused-but-set-variable]

It is never used, and so can be removed.

Signed-off-by: yu kuai <yukuai3@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 4042c2185e98..e17bfc87da90 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -1124,11 +1124,10 @@ bfa_nw_ioc_sem_release(void __iomem *sem_reg)
 static void
 bfa_ioc_fwver_clear(struct bfa_ioc *ioc)
 {
-	u32 pgnum, pgoff, loff = 0;
+	u32 pgnum, loff = 0;
 	int i;
 
 	pgnum = PSS_SMEM_PGNUM(ioc->ioc_regs.smem_pg0, loff);
-	pgoff = PSS_SMEM_PGOFF(loff);
 	writel(pgnum, ioc->ioc_regs.host_page_num_fn);
 
 	for (i = 0; i < (sizeof(struct bfi_ioc_image_hdr) / sizeof(u32)); i++) {
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bna: remove set but not used variable 'pgoff'
  2020-01-03 12:04 [PATCH] bna: remove set but not used variable 'pgoff' yu kuai
@ 2020-01-03 20:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-03 20:33 UTC (permalink / raw)
  To: yukuai3
  Cc: rmody, skalluru, GR-Linux-NIC-Dev, netdev, linux-kernel,
	yi.zhang, zhengbin13

From: yu kuai <yukuai3@huawei.com>
Date: Fri, 3 Jan 2020 20:04:37 +0800

> drivers/net/ethernet/brocade/bna/bfa_ioc.c: In function
> ‘bfa_ioc_fwver_clear’:
> drivers/net/ethernet/brocade/bna/bfa_ioc.c:1127:13: warning: variable
> ‘pgoff’ set but not used [-Wunused-but-set-variable]
> 
> It is never used, and so can be removed.
> 
> Signed-off-by: yu kuai <yukuai3@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-03 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 12:04 [PATCH] bna: remove set but not used variable 'pgoff' yu kuai
2020-01-03 20:33 ` 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.