scsi: ufs: Improve static type checking for the host controller state
authorBart Van Assche <bvanassche@acm.org>
Thu, 22 Jul 2021 03:34:29 +0000 (20:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 3 Aug 2021 01:43:58 +0000 (21:43 -0400)
commit9c202090edd4c7679adf5bf040d7ee19966feae6
tree14a6b2d8f536ed04fa0eafe45881dc7583b95b62
parent35c7d874f5993db04ce3aa310ae088f14b801eda
scsi: ufs: Improve static type checking for the host controller state

Assign a name to the enumeration type for UFS host controller states and
remove the default clause from switch statements on this enumeration type
to make the compiler warn about unhandled enumeration labels.

Link: https://lore.kernel.org/r/20210722033439.26550-9-bvanassche@acm.org
Cc: Can Guo <cang@codeaurora.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Keoseong Park <keosung.park@samsung.com>
Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h