All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: cros_ec_accel_legacy: Mark expected switch fall-throughs
@ 2018-10-08 17:23 Gustavo A. R. Silva
  2018-10-08 20:30 ` Jonathan Cameron
  2019-02-20 18:20 ` Kees Cook
  0 siblings, 2 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-08 17:23 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: linux-iio, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1397962 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/iio/accel/cros_ec_accel_legacy.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c b/drivers/iio/accel/cros_ec_accel_legacy.c
index 063e89e..d609654 100644
--- a/drivers/iio/accel/cros_ec_accel_legacy.c
+++ b/drivers/iio/accel/cros_ec_accel_legacy.c
@@ -385,8 +385,10 @@ static int cros_ec_accel_legacy_probe(struct platform_device *pdev)
 		switch (i) {
 		case X:
 			ec_accel_channels[X].scan_index = Y;
+			/* fall through */
 		case Y:
 			ec_accel_channels[Y].scan_index = X;
+			/* fall through */
 		case Z:
 			ec_accel_channels[Z].scan_index = Z;
 		}
-- 
2.7.4

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

end of thread, other threads:[~2019-02-21  1:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-08 17:23 [PATCH] iio: cros_ec_accel_legacy: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-08 20:30 ` Jonathan Cameron
2019-02-12 21:50   ` Gustavo A. R. Silva
2019-02-20 18:20 ` Kees Cook
2019-02-20 18:34   ` Jonathan Cameron
2019-02-20 18:47     ` Gustavo A. R. Silva
2019-02-21  1:23       ` Kees Cook
2019-02-21  1:48         ` Gustavo A. R. Silva

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.