diff mbox series

scsi: ufs: add fall through annotation

Message ID 20181126081034.30185-1-tomas.winkler@intel.com (mailing list archive)
State Accepted
Commit 30eb2e4cd5d69c15d4720f67db4be66f001dc9f6
Headers show
Series scsi: ufs: add fall through annotation | expand

Commit Message

Winkler, Tomas Nov. 26, 2018, 8:10 a.m. UTC
Add /* fallthrough */ annotation, to eliminate compilation warning:
warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Avri Altman Nov. 26, 2018, 3:56 p.m. UTC | #1
> -----Original Message-----
> From: Tomas Winkler <tomas.winkler@intel.com>
> Sent: Monday, November 26, 2018 10:11 AM
> To: James E . J . Bottomley <jejb@linux.vnet.ibm.com>; Martin K . Petersen
> <martin.petersen@oracle.com>; Vinayak Holikatti
> <vinholikatti@gmail.com>; Avri Altman <Avri.Altman@wdc.com>
> Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Tomas Winkler
> <tomas.winkler@intel.com>
> Subject: [PATCH] scsi: ufs: add fall through annotation
> 
> Add /* fallthrough */ annotation, to eliminate compilation warning:
> warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Martin K. Petersen Nov. 29, 2018, 2:35 a.m. UTC | #2
Tomas,

> Add /* fallthrough */ annotation, to eliminate compilation warning:
> warning: this statement may fall through [-Wimplicit-fallthrough=]

Applied to 4.20/scsi-fixes, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 3807efd895be..b15f5dab0618 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -1549,6 +1549,7 @@  int ufshcd_hold(struct ufs_hba *hba, bool async)
 		 * currently running. Hence, fall through to cancel gating
 		 * work and to enable clocks.
 		 */
+		/* fallthrough */
 	case CLKS_OFF:
 		ufshcd_scsi_block_requests(hba);
 		hba->clk_gating.state = REQ_CLKS_ON;
@@ -1560,6 +1561,7 @@  int ufshcd_hold(struct ufs_hba *hba, bool async)
 		 * fall through to check if we should wait for this
 		 * work to be done or not.
 		 */
+		/* fallthrough */
 	case REQ_CLKS_ON:
 		if (async) {
 			rc = -EAGAIN;
@@ -4618,6 +4620,7 @@  ufshcd_scsi_cmd_status(struct ufshcd_lrb *lrbp, int scsi_status)
 	switch (scsi_status) {
 	case SAM_STAT_CHECK_CONDITION:
 		ufshcd_copy_sense_data(lrbp);
+		/* fallthrough */
 	case SAM_STAT_GOOD:
 		result |= DID_OK << 16 |
 			  COMMAND_COMPLETE << 8 |