linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: block2mtd: mark expected switch fall-throughs
@ 2018-08-09 16:05 Gustavo A. R. Silva
  2018-11-09 19:34 ` Boris Brezillon
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-09 16:05 UTC (permalink / raw)
  To: Joern Engel, David Woodhouse, Brian Norris, Boris Brezillon,
	Marek Vasut, Richard Weinberger
  Cc: linux-mtd, 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: 402015 ("Missing break in switch")
Addresses-Coverity-ID: 402016 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/mtd/devices/block2mtd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index c9e4249..410a321 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -329,8 +329,10 @@ static int ustrtoul(const char *cp, char **endp, unsigned int base)
 	switch (**endp) {
 	case 'G' :
 		result *= 1024;
+		/* fall through */
 	case 'M':
 		result *= 1024;
+		/* fall through */
 	case 'K':
 	case 'k':
 		result *= 1024;
-- 
2.7.4


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

* Re: mtd: block2mtd: mark expected switch fall-throughs
  2018-08-09 16:05 [PATCH] mtd: block2mtd: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-11-09 19:34 ` Boris Brezillon
  0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-11-09 19:34 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Joern Engel, David Woodhouse, Brian Norris,
	Marek Vasut, Richard Weinberger
  Cc: Boris Brezillon, linux-mtd, linux-kernel

On Thu, 2018-08-09 at 16:05:13 UTC, "Gustavo A. R. Silva" wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 402015 ("Missing break in switch")
> Addresses-Coverity-ID: 402016 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied to http://git.infradead.org/linux-mtd.git mtd/next, thanks.

Boris

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

end of thread, other threads:[~2018-11-09 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 16:05 [PATCH] mtd: block2mtd: mark expected switch fall-throughs Gustavo A. R. Silva
2018-11-09 19:34 ` Boris Brezillon

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).