Commit 492096ec authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Martin K. Petersen

scsi: target: core: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of
warnings by explicitly adding a break statement and a fallthrough
pseudo-keyword instead of letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Link: https://lore.kernel.org/r/761d6f755e8a6f8a6daebd1e5c1394167e5c780a.1605896059.git.gustavoars@kernel.orgSigned-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 8b185fc6
...@@ -211,6 +211,7 @@ static unsigned long long iblock_emulate_read_cap_with_block_size( ...@@ -211,6 +211,7 @@ static unsigned long long iblock_emulate_read_cap_with_block_size(
break; break;
case 512: case 512:
blocks_long <<= 3; blocks_long <<= 3;
break;
default: default:
break; break;
} }
......
...@@ -337,6 +337,7 @@ static int core_scsi3_pr_seq_non_holder(struct se_cmd *cmd, u32 pr_reg_type, ...@@ -337,6 +337,7 @@ static int core_scsi3_pr_seq_non_holder(struct se_cmd *cmd, u32 pr_reg_type,
switch (pr_reg_type) { switch (pr_reg_type) {
case PR_TYPE_WRITE_EXCLUSIVE: case PR_TYPE_WRITE_EXCLUSIVE:
we = 1; we = 1;
fallthrough;
case PR_TYPE_EXCLUSIVE_ACCESS: case PR_TYPE_EXCLUSIVE_ACCESS:
/* /*
* Some commands are only allowed for the persistent reservation * Some commands are only allowed for the persistent reservation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment