public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] scsi: fcoe: remove set but not used variable 'port'
@ 2018-12-20  2:43 YueHaibing
  2018-12-20  9:14 ` Johannes Thumshirn
  2018-12-21  0:47 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-12-20  2:43 UTC (permalink / raw)
  To: kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/fcoe/fcoe.c: In function 'fcoe_recv_frame':
drivers/scsi/fcoe/fcoe.c:1672:20: warning:
 variable 'port' set but not used [-Wunused-but-set-variable]

drivers/scsi/fcoe/fcoe.c: In function 'fcoe_device_notification':
drivers/scsi/fcoe/fcoe.c:1861:20: warning:
 variable 'port' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/scsi/fcoe/fcoe.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 4961ae4..cd19be3 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1669,7 +1669,6 @@ static void fcoe_recv_frame(struct sk_buff *skb)
 	struct fc_stats *stats;
 	struct fcoe_crc_eof crc_eof;
 	struct fc_frame *fp;
-	struct fcoe_port *port;
 	struct fcoe_hdr *hp;
 
 	fr = fcoe_dev_from_skb(skb);
@@ -1687,7 +1686,6 @@ static void fcoe_recv_frame(struct sk_buff *skb)
 			skb_end_pointer(skb), skb->csum,
 			skb->dev ? skb->dev->name : "<NULL>");
 
-	port = lport_priv(lport);
 	skb_linearize(skb); /* check for skb_is_nonlinear is within skb_linearize */
 
 	/*
@@ -1858,7 +1856,6 @@ static int fcoe_device_notification(struct notifier_block *notifier,
 	struct net_device *netdev = netdev_notifier_info_to_dev(ptr);
 	struct fcoe_ctlr *ctlr;
 	struct fcoe_interface *fcoe;
-	struct fcoe_port *port;
 	struct fc_stats *stats;
 	u32 link_possible = 1;
 	u32 mfs;
@@ -1896,7 +1893,6 @@ static int fcoe_device_notification(struct notifier_block *notifier,
 		break;
 	case NETDEV_UNREGISTER:
 		list_del(&fcoe->list);
-		port = lport_priv(ctlr->lp);
 		fcoe_vport_remove(lport);
 		mutex_lock(&fcoe_config_mutex);
 		fcoe_if_destroy(lport);

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

* Re: [PATCH -next] scsi: fcoe: remove set but not used variable 'port'
  2018-12-20  2:43 [PATCH -next] scsi: fcoe: remove set but not used variable 'port' YueHaibing
@ 2018-12-20  9:14 ` Johannes Thumshirn
  2018-12-21  0:47 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2018-12-20  9:14 UTC (permalink / raw)
  To: kernel-janitors

I somehow have a deja vu feeling I have already acked it, but anyways:
Acked-by: Johannes Thumshirn <jth@kernel.org>

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

* Re: [PATCH -next] scsi: fcoe: remove set but not used variable 'port'
  2018-12-20  2:43 [PATCH -next] scsi: fcoe: remove set but not used variable 'port' YueHaibing
  2018-12-20  9:14 ` Johannes Thumshirn
@ 2018-12-21  0:47 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2018-12-21  0:47 UTC (permalink / raw)
  To: kernel-janitors


YueHaibing,

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/fcoe/fcoe.c: In function 'fcoe_recv_frame':
> drivers/scsi/fcoe/fcoe.c:1672:20: warning:
>  variable 'port' set but not used [-Wunused-but-set-variable]
>
> drivers/scsi/fcoe/fcoe.c: In function 'fcoe_device_notification':
> drivers/scsi/fcoe/fcoe.c:1861:20: warning:
>  variable 'port' set but not used [-Wunused-but-set-variable]

Applied to 4.21/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2018-12-21  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-20  2:43 [PATCH -next] scsi: fcoe: remove set but not used variable 'port' YueHaibing
2018-12-20  9:14 ` Johannes Thumshirn
2018-12-21  0:47 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox