]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita3a2a2d761cd6fa5d7d35534e83887cb88b0da9f
tree14a6b2d8f536ed04fa0eafe45881dc7583b95b62
parentf29c0ad61ec484549460d1be27971a9363b8d446
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