All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang
@ 2021-05-28 20:08 Gustavo A. R. Silva
  2021-06-01 19:20 ` Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2021-05-28 20:08 UTC (permalink / raw)
  To: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen
  Cc: MPT-FusionLinux.pdl, linux-scsi, linux-kernel,
	Gustavo A. R. Silva, linux-hardening

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(+)

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;
 		}
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang
  2021-05-28 20:08 [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang Gustavo A. R. Silva
@ 2021-06-01 19:20 ` Kees Cook
  2021-06-02  3:23 ` Martin K. Petersen
  2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Kees Cook @ 2021-06-01 19:20 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel, linux-hardening

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>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang
  2021-05-28 20:08 [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang Gustavo A. R. Silva
  2021-06-01 19:20 ` Kees Cook
@ 2021-06-02  3:23 ` Martin K. Petersen
  2021-06-02  3:32   ` Gustavo A. R. Silva
  2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Martin K. Petersen @ 2021-06-02  3:23 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, Martin K. Petersen, MPT-FusionLinux.pdl,
	linux-scsi, linux-kernel, linux-hardening


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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang
  2021-06-02  3:23 ` Martin K. Petersen
@ 2021-06-02  3:32   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2021-06-02  3:32 UTC (permalink / raw)
  To: Martin K. Petersen, Gustavo A. R. Silva
  Cc: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani,
	James E.J. Bottomley, MPT-FusionLinux.pdl, linux-scsi,
	linux-kernel, linux-hardening



On 6/1/21 22:23, Martin K. Petersen wrote:

> Applied to 5.14/scsi-staging, thanks!

Thanks, Martin.
--
Gustavo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang
  2021-05-28 20:08 [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang Gustavo A. R. Silva
  2021-06-01 19:20 ` Kees Cook
  2021-06-02  3:23 ` Martin K. Petersen
@ 2021-06-08  3:05 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2021-06-08  3:05 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Sreekanth Reddy, Sathya Prakash,
	Suganath Prabu Subramani, James E.J. Bottomley
  Cc: Martin K . Petersen, linux-scsi, MPT-FusionLinux.pdl,
	linux-hardening, linux-kernel

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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-08  3:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 20:08 [PATCH][next] scsi: mpt3sas: Fix fall-through warnings for Clang Gustavo A. R. Silva
2021-06-01 19:20 ` Kees Cook
2021-06-02  3:23 ` Martin K. Petersen
2021-06-02  3:32   ` Gustavo A. R. Silva
2021-06-08  3:05 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.