LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev'
@ 2019-04-24  8:02 Yue Haibing
  2019-05-10  5:28 ` Manish Rangankar
  2019-05-13 22:33 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Yue Haibing @ 2019-04-24  8:02 UTC (permalink / raw)
  To: QLogic-Storage-Upstream, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi, YueHaibing

From: YueHaibing <yuehaibing@huawei.com>

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

drivers/scsi/qedi/qedi_iscsi.c: In function 'qedi_ep_connect':
drivers/scsi/qedi/qedi_iscsi.c:813:23: warning: variable 'udev' set but not used [-Wunused-but-set-variable]
drivers/scsi/qedi/qedi_iscsi.c:812:18: warning: variable 'cdev' set but not used [-Wunused-but-set-variable]

They are never used since introduction.

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

diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index e4391ee..688a6d8 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -809,8 +809,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
 	struct qedi_endpoint *qedi_ep;
 	struct sockaddr_in *addr;
 	struct sockaddr_in6 *addr6;
-	struct qed_dev *cdev  =  NULL;
-	struct qedi_uio_dev *udev = NULL;
 	struct iscsi_path path_req;
 	u32 msg_type = ISCSI_KEVENT_IF_DOWN;
 	u32 iscsi_cid = QEDI_CID_RESERVED;
@@ -830,8 +828,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
 	}
 
 	qedi = iscsi_host_priv(shost);
-	cdev = qedi->cdev;
-	udev = qedi->udev;
 
 	if (test_bit(QEDI_IN_OFFLINE, &qedi->flags) ||
 	    test_bit(QEDI_IN_RECOVERY, &qedi->flags)) {
-- 
2.7.4



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

* RE: [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev'
  2019-04-24  8:02 [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev' Yue Haibing
@ 2019-05-10  5:28 ` Manish Rangankar
  2019-05-13 22:33 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Manish Rangankar @ 2019-05-10  5:28 UTC (permalink / raw)
  To: Yue Haibing, QLogic-Storage-Upstream, jejb, martin.petersen
  Cc: linux-kernel, linux-scsi


> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org <linux-scsi-
> owner@vger.kernel.org> On Behalf Of Yue Haibing
> Sent: Wednesday, April 24, 2019 1:33 PM
> To: QLogic-Storage-Upstream@cavium.com; jejb@linux.ibm.com;
> martin.petersen@oracle.com
> Cc: linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org; YueHaibing
> <yuehaibing@huawei.com>
> Subject: [PATCH -next] scsi: qedi: remove set but not used variables 'cdev'
> and 'udev'
> 
> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/scsi/qedi/qedi_iscsi.c: In function 'qedi_ep_connect':
> drivers/scsi/qedi/qedi_iscsi.c:813:23: warning: variable 'udev' set but not
> used [-Wunused-but-set-variable]
> drivers/scsi/qedi/qedi_iscsi.c:812:18: warning: variable 'cdev' set but not
> used [-Wunused-but-set-variable]
> 
> They are never used since introduction.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/scsi/qedi/qedi_iscsi.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
> index e4391ee..688a6d8 100644
> --- a/drivers/scsi/qedi/qedi_iscsi.c
> +++ b/drivers/scsi/qedi/qedi_iscsi.c
> @@ -809,8 +809,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct
> sockaddr *dst_addr,
>  	struct qedi_endpoint *qedi_ep;
>  	struct sockaddr_in *addr;
>  	struct sockaddr_in6 *addr6;
> -	struct qed_dev *cdev  =  NULL;
> -	struct qedi_uio_dev *udev = NULL;
>  	struct iscsi_path path_req;
>  	u32 msg_type = ISCSI_KEVENT_IF_DOWN;
>  	u32 iscsi_cid = QEDI_CID_RESERVED;
> @@ -830,8 +828,6 @@ qedi_ep_connect(struct Scsi_Host *shost, struct
> sockaddr *dst_addr,
>  	}
> 
>  	qedi = iscsi_host_priv(shost);
> -	cdev = qedi->cdev;
> -	udev = qedi->udev;
> 
>  	if (test_bit(QEDI_IN_OFFLINE, &qedi->flags) ||
>  	    test_bit(QEDI_IN_RECOVERY, &qedi->flags)) {
> --
> 2.7.4
> 

Thanks,

Acked-by: Manish Rangankar <mrangankar@marvell.com>

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

* Re: [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev'
  2019-04-24  8:02 [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev' Yue Haibing
  2019-05-10  5:28 ` Manish Rangankar
@ 2019-05-13 22:33 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-05-13 22:33 UTC (permalink / raw)
  To: Yue Haibing
  Cc: QLogic-Storage-Upstream, jejb, martin.petersen, linux-kernel, linux-scsi


Yue,

> From: YueHaibing <yuehaibing@huawei.com>
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/scsi/qedi/qedi_iscsi.c: In function 'qedi_ep_connect':
> drivers/scsi/qedi/qedi_iscsi.c:813:23: warning: variable 'udev' set but not used [-Wunused-but-set-variable]
> drivers/scsi/qedi/qedi_iscsi.c:812:18: warning: variable 'cdev' set but not used [-Wunused-but-set-variable]

Applied to 5.2/scsi-queue. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2019-05-13 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  8:02 [PATCH -next] scsi: qedi: remove set but not used variables 'cdev' and 'udev' Yue Haibing
2019-05-10  5:28 ` Manish Rangankar
2019-05-13 22:33 ` 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;
as well as URLs for NNTP newsgroup(s).