diff options
| author | Hannes Reinecke <[email protected]> | 2021-04-27 10:30:12 +0200 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-05-31 22:48:21 -0400 |
| commit | ced202f7bd78eb6a79c441a8b217e0f3d38bccfc (patch) | |
| tree | a1f7fc246edf2ab038685b64540ce53392b145a6 /include | |
| parent | 7e26e3ea028740f934477ec01ba586ab033c35aa (diff) | |
scsi: core: Stop using DRIVER_ERROR
Return the actual error code in __scsi_execute() (which, according to the
documentation, should have happened anyway). And audit all callers to cope
with negative return values from __scsi_execute() and friends.
[mkp: resolve conflict and return bool]
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Bart Van Assche <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/scsi/scsi.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 7f392405991b..6dc2d1b3735e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -259,10 +259,13 @@ enum scsi_disposition { * This returns true for known good conditions that may be treated as * command completed normally */ -static inline int scsi_status_is_good(int status) +static inline bool scsi_status_is_good(int status) { + if (status < 0) + return false; + if (host_byte(status) == DID_NO_CONNECT) - return 0; + return false; /* * FIXME: bit0 is listed as reserved in SCSI-2, but is |