Skip to contentSkip to conversation

scsi: mpi3mr: Fix fall-through warning for Clang

PATCH Applied Gustavo A. R. Silva 3 participants 4 messages Jun 4, 2021 – Jun 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: mpi3mr: Fix fall-through warning for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case.

---
JFYI: We had thousands of these sorts of warnings and now we are down
to just 22 in linux-next. This is one of those last remaining warnings.

 drivers/scsi/mpi3mr/mpi3mr_os.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/mpi3mr/mpi3mr_os.c +1 -0
index a54aa009ec5a..4ab0609a1b94 100644
@@ -1732,6 +1732,7 @@ static void mpi3mr_sastopochg_evt_th(struct mpi3mr_ioc *mrioc,
 				atomic_dec_if_positive
 				    (&scsi_tgt_priv_data->block_io);
 			}
+			break;
 		case MPI3_EVENT_SAS_TOPO_PHY_RC_PHY_CHANGED:
 		default:
 			break;
Signature · 1 line
2.27.0
#2 lore raw
In reply to Gustavo A. R. Silva

Gustavo,

Quoted 3 lines

In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case.

Applied to 5.14/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#3 lore raw
In reply to Gustavo A. R. Silva
Quoted 3 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a fall-through warning by explicitly adding a break statement instead of just letting the code fall through to the next case.

Applied to 5.14/scsi-queue, thanks!

[1/1] scsi: mpi3mr: Fix fall-through warning for Clang

      https://git.kernel.org/mkp/scsi/c/7b8a49881b01
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering