All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
@ 2021-06-18 16:45 SeongJae Park
  2021-06-21  5:23 ` [EXT] " Saurav Kashyap
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: SeongJae Park @ 2021-06-18 16:45 UTC (permalink / raw)
  To: skashyap
  Cc: jhasan, GR-QLogic-Storage-Upstream, jejb, martin.petersen,
	himanshu.madhani, linux-scsi, linux-kernel, SeongJae Park

From: SeongJae Park <sjpark@amazon.de>

Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already
in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED'
when 'io_req' is alrady in ABTS processing, regardless of the return
value of 'bnx2fc_abts_cleanup()'.  But, it left the assignment of the
return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless
now.  This commit removes it.

This issue was discovered and resolved using Coverity Static Analysis
Security Testing (SAST) by Synopsys, Inc.

Fixes: 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTS processing")
Signed-off-by: SeongJae Park <sjpark@amazon.de>
---
 drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index ed300a279a38..f2996a9b2f63 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1213,7 +1213,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
 		 * cleanup the command and return that I/O was successfully
 		 * aborted.
 		 */
-		rc = bnx2fc_abts_cleanup(io_req);
+		bnx2fc_abts_cleanup(io_req);
 		/* This only occurs when an task abort was requested while ABTS
 		   is in progress.  Setting the IO_CLEANUP flag will skip the
 		   RRQ process in the case when the fw generated SCSI_CMD cmpl
-- 
2.17.1


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

* RE: [EXT] [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
  2021-06-18 16:45 [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment SeongJae Park
@ 2021-06-21  5:23 ` Saurav Kashyap
  2021-06-23  2:05 ` Martin K. Petersen
  2021-06-29  4:10 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Saurav Kashyap @ 2021-06-21  5:23 UTC (permalink / raw)
  To: SeongJae Park
  Cc: Javed Hasan, GR-QLogic-Storage-Upstream, jejb, martin.petersen,
	himanshu.madhani, linux-scsi, linux-kernel, SeongJae Park

Hi SeongJae,

> -----Original Message-----
> From: SeongJae Park <sj38.park@gmail.com>
> Sent: Friday, June 18, 2021 10:15 PM
> To: Saurav Kashyap <skashyap@marvell.com>
> Cc: Javed Hasan <jhasan@marvell.com>; GR-QLogic-Storage-Upstream <GR-
> QLogic-Storage-Upstream@marvell.com>; jejb@linux.ibm.com;
> martin.petersen@oracle.com; himanshu.madhani@oracle.com; linux-
> scsi@vger.kernel.org; linux-kernel@vger.kernel.org; SeongJae Park
> <sjpark@amazon.de>
> Subject: [EXT] [PATCH] scsi: bnx2fc: Remove meaningless
> 'bnx2fc_abts_cleanup()' return value assignment
> 
> External Email
> 
> ----------------------------------------------------------------------
> From: SeongJae Park <sjpark@amazon.de>
> 
> Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already
> in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED'
> when 'io_req' is alrady in ABTS processing, regardless of the return
> value of 'bnx2fc_abts_cleanup()'.  But, it left the assignment of the
> return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless
> now.  This commit removes it.
> 
> This issue was discovered and resolved using Coverity Static Analysis
> Security Testing (SAST) by Synopsys, Inc.
> 
> Fixes: 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTS
> processing")
> Signed-off-by: SeongJae Park <sjpark@amazon.de>
> ---
>  drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index ed300a279a38..f2996a9b2f63 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1213,7 +1213,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
>  		 * cleanup the command and return that I/O was successfully
>  		 * aborted.
>  		 */
> -		rc = bnx2fc_abts_cleanup(io_req);
> +		bnx2fc_abts_cleanup(io_req);
>  		/* This only occurs when an task abort was requested while
> ABTS
>  		   is in progress.  Setting the IO_CLEANUP flag will skip the
>  		   RRQ process in the case when the fw generated SCSI_CMD
> cmpl

Acked-by: Saurav Kashyap <skashyap@marvell.com>

Thanks,
~Saurav 
> --
> 2.17.1



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

* Re: [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
  2021-06-18 16:45 [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment SeongJae Park
  2021-06-21  5:23 ` [EXT] " Saurav Kashyap
@ 2021-06-23  2:05 ` Martin K. Petersen
  2021-06-29  4:10 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-23  2:05 UTC (permalink / raw)
  To: SeongJae Park
  Cc: skashyap, jhasan, GR-QLogic-Storage-Upstream, jejb,
	martin.petersen, himanshu.madhani, linux-scsi, linux-kernel,
	SeongJae Park


SeongJae,

> Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is
> already in ABTS processing") made 'bnx2fc_eh_abort()' to return
> 'FAILED' when 'io_req' is alrady in ABTS processing, regardless of the
> return value of 'bnx2fc_abts_cleanup()'.  But, it left the assignment
> of the return value of 'bnx2fc_abts_cleanup()' to 'rc', which is
> meaningless now.  This commit removes it.

Applied to 5.14/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
  2021-06-18 16:45 [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment SeongJae Park
  2021-06-21  5:23 ` [EXT] " Saurav Kashyap
  2021-06-23  2:05 ` Martin K. Petersen
@ 2021-06-29  4:10 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-29  4:10 UTC (permalink / raw)
  To: SeongJae Park, skashyap
  Cc: Martin K . Petersen, jejb, GR-QLogic-Storage-Upstream,
	linux-scsi, SeongJae Park, jhasan, linux-kernel,
	himanshu.madhani

On Fri, 18 Jun 2021 16:45:14 +0000, SeongJae Park wrote:

> Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already
> in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED'
> when 'io_req' is alrady in ABTS processing, regardless of the return
> value of 'bnx2fc_abts_cleanup()'.  But, it left the assignment of the
> return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless
> now.  This commit removes it.
> 
> [...]

Applied to 5.14/scsi-queue, thanks!

[1/1] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
      https://git.kernel.org/mkp/scsi/c/73b306a2bcb7

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2021-06-29  4:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 16:45 [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment SeongJae Park
2021-06-21  5:23 ` [EXT] " Saurav Kashyap
2021-06-23  2:05 ` Martin K. Petersen
2021-06-29  4:10 ` Martin K. Petersen

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.