public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qla2xxx: Use -EIO in qla_get_tmf()
@ 2024-04-19 12:34 Markus Elfring
  2024-04-19 12:45 ` James Bottomley
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2024-04-19 12:34 UTC (permalink / raw)
  To: linux-scsi, kernel-janitors, GR-QLogic-Storage-Upstream,
	James E. J. Bottomley, Martin K. Petersen, Nilesh Javali
  Cc: LKML

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 19 Apr 2024 14:24:56 +0200

Add a minus sign before the error code “EIO”
so that a negative value will eventually be returned
as in another error case.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 8377624d76c9..8d93d9631ba3 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2281,7 +2281,7 @@ int qla_get_tmf(struct tmf_arg *arg)
 		if (TMF_NOT_READY(fcport)) {
 			ql_log(ql_log_warn, vha, 0x802c,
 			    "Unable to acquire TM resource due to disruption.\n");
-			rc = EIO;
+			rc = -EIO;
 			break;
 		}
 		if (ha->active_tmf < MAX_ACTIVE_TMF &&
--
2.44.0


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

* Re: [PATCH] scsi: qla2xxx: Use -EIO in qla_get_tmf()
  2024-04-19 12:34 [PATCH] scsi: qla2xxx: Use -EIO in qla_get_tmf() Markus Elfring
@ 2024-04-19 12:45 ` James Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2024-04-19 12:45 UTC (permalink / raw)
  To: Markus Elfring, linux-scsi, kernel-janitors,
	GR-QLogic-Storage-Upstream, Martin K. Petersen, Nilesh Javali
  Cc: LKML

On Fri, 2024-04-19 at 14:34 +0200, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 19 Apr 2024 14:24:56 +0200
> 
> Add a minus sign before the error code “EIO”
> so that a negative value will eventually be returned
> as in another error case.

No it won't.  If you look how it's used the consumer doesn't pass on
the error.

James


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

end of thread, other threads:[~2024-04-19 12:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-19 12:34 [PATCH] scsi: qla2xxx: Use -EIO in qla_get_tmf() Markus Elfring
2024-04-19 12:45 ` James Bottomley

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