* [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang
@ 2021-06-04 2:35 Gustavo A. R. Silva
2021-06-04 18:22 ` Kees Cook
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2021-06-04 2:35 UTC (permalink / raw)
To: James E.J. Bottomley, Martin K. Petersen
Cc: linux-scsi, linux-kernel, Gustavo A. R. Silva, linux-hardening,
Kees Cook
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.
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
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(+)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c
index a54aa009ec5a..4ab0609a1b94 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_os.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_os.c
@@ -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;
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang
2021-06-04 2:35 [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang Gustavo A. R. Silva
@ 2021-06-04 18:22 ` Kees Cook
2021-06-08 2:23 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Kees Cook @ 2021-06-04 18:22 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel, linux-hardening
On Thu, Jun 03, 2021 at 09:35:30PM -0500, Gustavo A. R. Silva wrote:
> 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.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Looks right.
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang
2021-06-04 2:35 [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-04 18:22 ` Kees Cook
@ 2021-06-08 2:23 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-08 2:23 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel, linux-hardening, Kees Cook
Gustavo,
> 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!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang
2021-06-04 2:35 [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-04 18:22 ` Kees Cook
2021-06-08 2:23 ` Martin K. Petersen
@ 2021-06-16 3:48 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-16 3:48 UTC (permalink / raw)
To: James E.J. Bottomley, Gustavo A. R. Silva
Cc: Martin K . Petersen, linux-scsi, linux-kernel, Kees Cook,
linux-hardening
On Thu, 3 Jun 2021 21:35:30 -0500, Gustavo A. R. Silva wrote:
> 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
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-16 3:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 2:35 [PATCH][next] scsi: mpi3mr: Fix fall-through warning for Clang Gustavo A. R. Silva
2021-06-04 18:22 ` Kees Cook
2021-06-08 2:23 ` Martin K. Petersen
2021-06-16 3:48 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).