scsi: qedi: remove set but not used variables ‘cdev’ and ‘udev’ [Linux 4.14.128]

scsi: qedi: remove set but not used variables ‘cdev’ and ‘udev’ [Linux 4.14.128]

This Linux kernel change "scsi: qedi: remove set but not used variables ‘cdev’ and ‘udev’" is included in the Linux 4.14.128 release. This change is authored by YueHaibing <yuehaibing [at] huawei.com> on Wed Apr 24 16:02:56 2019 +0800. The commit for this change in Linux stable tree is aaca4fd (patch) which is from upstream commit d0adee5. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream d0adee5.

scsi: qedi: remove set but not used variables 'cdev' and 'udev'

[ Upstream commit d0adee5d12752256ff0c87ad7f002f21fe49d618 ]

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]

These have never been used since introduction.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 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 0b7267e..94f3829 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -817,8 +817,6 @@ static int qedi_task_xmit(struct iscsi_task *task)
    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;
@@ -838,8 +836,6 @@ static int qedi_task_xmit(struct iscsi_task *task)
    }

    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)) {

Leave a Reply

Your email address will not be published. Required fields are marked *