Message ID | 20210528200828.GA39349@embeddedor (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [next] scsi: mpt3sas: Fix fall-through warnings for Clang | expand |
On Fri, May 28, 2021 at 03:08:28PM -0500, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding break statements 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> Reviewed-by: Kees Cook <keescook@chromium.org>
Gustavo, > In preparation to enable -Wimplicit-fallthrough for Clang, fix a > couple of warnings by explicitly adding break statements instead of > just letting the code fall through to the next case. Applied to 5.14/scsi-staging, thanks!
On 6/1/21 22:23, Martin K. Petersen wrote:
> Applied to 5.14/scsi-staging, thanks!
Thanks, Martin.
--
Gustavo
On Fri, 28 May 2021 15:08:28 -0500, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple > of warnings by explicitly adding break statements instead of just letting > the code fall through to the next case. Applied to 5.14/scsi-queue, thanks! [1/1] scsi: mpt3sas: Fix fall-through warnings for Clang https://git.kernel.org/mkp/scsi/c/84a84cc6aff4
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 68fde055b02f..969c0d676ae2 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4435,6 +4435,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device); break; } + break; default: break; } diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index d00aca3c77ce..d9d5e9c0e110 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -11932,6 +11932,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id) ioc->multipath_on_hba = 1; else ioc->multipath_on_hba = 0; + break; default: break; }
In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding break statements 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 25 in linux-next. These are some of those last remaining warnings. drivers/scsi/mpt3sas/mpt3sas_base.c | 1 + drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + 2 files changed, 2 insertions(+)