summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_priv.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-04-16 01:08:11 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-04-16 05:44:40 +0300
commitb8e162f9e7e2da6e823a4984d6aa0523e278babf (patch)
treefcc0568d9fd33460ed837277c91c72858fe3a408 /drivers/scsi/scsi_priv.h
parent280e91b026653af77296b5feb54f16d85973b104 (diff)
downloadlinux-b8e162f9e7e2da6e823a4984d6aa0523e278babf.tar.xz
scsi: core: Introduce enum scsi_disposition
Improve readability of the code in the SCSI core by introducing an enumeration type for the values used internally that decide how to continue processing a SCSI command. The eh_*_handler return values have not been changed because that would involve modifying all SCSI drivers. The output of the following command has been inspected to verify that no out-of-range values are assigned to a variable of type enum scsi_disposition: KCFLAGS=-Wassign-enum make CC=clang W=1 drivers/scsi/ Link: https://lore.kernel.org/r/20210415220826.29438-6-bvanassche@acm.org Cc: Christoph Hellwig <hch@lst.de> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Daniel Wagner <dwagner@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
-rw-r--r--drivers/scsi/scsi_priv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index ed240f006c04..75d6f23e4fff 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -74,7 +74,7 @@ extern void scsi_exit_devinfo(void);
extern void scmd_eh_abort_handler(struct work_struct *work);
extern enum blk_eh_timer_return scsi_times_out(struct request *req);
extern int scsi_error_handler(void *host);
-extern int scsi_decide_disposition(struct scsi_cmnd *cmd);
+extern enum scsi_disposition scsi_decide_disposition(struct scsi_cmnd *cmd);
extern void scsi_eh_wakeup(struct Scsi_Host *shost);
extern void scsi_eh_scmd_add(struct scsi_cmnd *);
void scsi_eh_ready_devs(struct Scsi_Host *shost,