2019-03-29 03:26:28

by Ding Xiang

[permalink] [raw]
Subject: [PATCH] scsi: bnx2fc: remove unneeded variable

"rc" is unneeded,just return SUCCESS

Signed-off-by: Ding Xiang <[email protected]>
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index bc9f2a2..8def63c 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1083,7 +1083,6 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
{
struct bnx2fc_rport *tgt = io_req->tgt;
- int rc = SUCCESS;
unsigned int time_left;

io_req->wait_for_comp = 1;
@@ -1110,7 +1109,7 @@ static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
kref_put(&io_req->refcount, bnx2fc_cmd_release);

spin_lock_bh(&tgt->tgt_lock);
- return rc;
+ return SUCCESS;
}

/**
--
1.9.1





2019-03-29 04:14:32

by Manish Rangankar

[permalink] [raw]
Subject: RE: [PATCH] scsi: bnx2fc: remove unneeded variable


> -----Original Message-----
> From: Ding Xiang <[email protected]>
> Sent: Friday, March 29, 2019 8:54 AM
> To: [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]
> Subject: [PATCH] scsi: bnx2fc: remove unneeded variable
>
> "rc" is unneeded,just return SUCCESS
>
> Signed-off-by: Ding Xiang <[email protected]>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c
> b/drivers/scsi/bnx2fc/bnx2fc_io.c index bc9f2a2..8def63c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1083,7 +1083,6 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd
> *sc_cmd) static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req) {
> struct bnx2fc_rport *tgt = io_req->tgt;
> - int rc = SUCCESS;
> unsigned int time_left;
>
> io_req->wait_for_comp = 1;
> @@ -1110,7 +1109,7 @@ static int bnx2fc_abts_cleanup(struct
> bnx2fc_cmd *io_req)
> kref_put(&io_req->refcount, bnx2fc_cmd_release);
>
> spin_lock_bh(&tgt->tgt_lock);
> - return rc;
> + return SUCCESS;
> }
>
> /**
> --
> 1.9.1
>

Thanks,
Acked-by: Manish Rangankar <[email protected]>


2019-03-29 07:11:07

by Mukesh Ojha

[permalink] [raw]
Subject: Re: [PATCH] scsi: bnx2fc: remove unneeded variable


On 3/29/2019 8:54 AM, Ding Xiang wrote:
> "rc" is unneeded,just return SUCCESS

"rc variable isĀ  not needed in `bnx2fc_abts_cleanup`. Fix this by
removing it ."


Reviewed-by: Mukesh Ojha <[email protected]>

-Mukesh

>
> Signed-off-by: Ding Xiang <[email protected]>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index bc9f2a2..8def63c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1083,7 +1083,6 @@ int bnx2fc_eh_device_reset(struct scsi_cmnd *sc_cmd)
> static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
> {
> struct bnx2fc_rport *tgt = io_req->tgt;
> - int rc = SUCCESS;
> unsigned int time_left;
>
> io_req->wait_for_comp = 1;
> @@ -1110,7 +1109,7 @@ static int bnx2fc_abts_cleanup(struct bnx2fc_cmd *io_req)
> kref_put(&io_req->refcount, bnx2fc_cmd_release);
>
> spin_lock_bh(&tgt->tgt_lock);
> - return rc;
> + return SUCCESS;
> }
>
> /**

2019-03-29 14:19:52

by Martin K. Petersen

[permalink] [raw]
Subject: Re: [PATCH] scsi: bnx2fc: remove unneeded variable


Ding,

> "rc" is unneeded,just return SUCCESS

Applied to 5.2/scsi-queue. Thanks!

--
Martin K. Petersen Oracle Linux Engineering