diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-05-23 19:54:56 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-02 23:09:39 -0400 |
commit | 149d0e489e807f1e6dc265f975a793cea11ecbea (patch) | |
tree | a0e16e90e239694ff6a13f0551dd55a07be67985 /drivers/target | |
parent | d377f415dddc18b33c88dcd41cfe4fe6d9db82fb (diff) | |
download | linux-stable-149d0e489e807f1e6dc265f975a793cea11ecbea.tar.gz linux-stable-149d0e489e807f1e6dc265f975a793cea11ecbea.tar.bz2 linux-stable-149d0e489e807f1e6dc265f975a793cea11ecbea.zip |
scsi: core: Introduce enums for the SAM and host status codes
Make it possible for the compiler to verify whether SAM and host
status codes are used correctly.
[mkp: resolve conflicts with Hannes' SCSI result series]
Link: https://lore.kernel.org/r/20210524025457.11299-3-bvanassche@acm.org
Cc: Hannes Reinecke <hare@suse.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_pscsi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index e2b97cba6679..1646ba8eda11 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -1044,7 +1044,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) struct se_cmd *cmd = req->end_io_data; struct pscsi_plugin_task *pt = cmd->priv; int result = scsi_req(req)->result; - u8 scsi_status = result & 0xff; + enum sam_status scsi_status = result & 0xff; if (scsi_status != SAM_STAT_GOOD) { pr_debug("PSCSI Status Byte exception at cmd: %p CDB:" |