scsi: mpt3sas: Fix fall-through warnings for Clang
Subsystems (2)
PATCH 1/1 scsi: mpt3sas: Fix fall-through warnings for Clang
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.
---
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(+)
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -0
@@ -4435,6 +4435,7 @@ _base_display_OEMs_branding(struct MPT3SAS_ADAPTER *ioc) ioc->pdev->subsystem_device);break ; } +break ;default :break ; }
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -0
@@ -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 ; }
Signature · 1 line
2.27.0
Quoted 6 lines · Gustavo A. R. Silva
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.
Signature · 1 line
Kees Cook
Martin K. Petersen
AppliedGustavo,
Quoted 3 lines
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!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 1 line · Martin K. Petersen
Applied to 5.14/scsi-staging, thanks!
Thanks, Martin.
--
Gustavo
Martin K. Petersen
AppliedQuoted 3 lines · Gustavo A. R. Silva
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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering