diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-20 14:40:17 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-26 23:24:49 -0400 |
commit | 957d63e77a9ce9ef63b2a6b4d1d84d549e427cd8 (patch) | |
tree | e539e405c55d2cdd8a090cc81f51093cb204d943 /drivers/scsi/ufs/ufshci.h | |
parent | 91bb765ccab1a067e646c9dbed0b5ed0bb7c39c9 (diff) | |
download | lwn-957d63e77a9ce9ef63b2a6b4d1d84d549e427cd8.tar.gz lwn-957d63e77a9ce9ef63b2a6b4d1d84d549e427cd8.zip |
scsi: ufs: core: Improve static type checking
Introduce an enumeration type for the overall command status to allow the
compiler to perform more static type checking.
Link: https://lore.kernel.org/r/20211020214024.2007615-4-bvanassche@acm.org
Acked-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufshci.h')
-rw-r--r-- | drivers/scsi/ufs/ufshci.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h index 9a754fab8908..f66cf9e477cb 100644 --- a/drivers/scsi/ufs/ufshci.h +++ b/drivers/scsi/ufs/ufshci.h @@ -389,7 +389,7 @@ enum { }; /* Overall command status values */ -enum { +enum utp_ocs { OCS_SUCCESS = 0x0, OCS_INVALID_CMD_TABLE_ATTR = 0x1, OCS_INVALID_PRDT_ATTR = 0x2, @@ -402,6 +402,9 @@ enum { OCS_INVALID_CRYPTO_CONFIG = 0x9, OCS_GENERAL_CRYPTO_ERROR = 0xA, OCS_INVALID_COMMAND_STATUS = 0x0F, +}; + +enum { MASK_OCS = 0x0F, }; |