linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: paride: pd: mark expected switch fall-throughs
@ 2018-08-09 15:54 Gustavo A. R. Silva
  2018-08-09 16:18 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-09 15:54 UTC (permalink / raw)
  To: Tim Waugh, Jens Axboe; +Cc: linux-block, 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: 1056543 ("Missing break in switch")
Addresses-Coverity-ID: 1056544 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/block/paride/pd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 8961b190..7cf9475 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -426,6 +426,7 @@ static void run_fsm(void)
 				pd_claimed = 1;
 				if (!pi_schedule_claimed(pi_current, run_fsm))
 					return;
+				/* fall through */
 			case 1:
 				pd_claimed = 2;
 				pi_current->proto->connect(pi_current);
@@ -445,6 +446,7 @@ static void run_fsm(void)
 				spin_unlock_irqrestore(&pd_lock, saved_flags);
 				if (stop)
 					return;
+				/* fall through */
 			case Hold:
 				schedule_fsm();
 				return;
-- 
2.7.4


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

* Re: [PATCH] block: paride: pd: mark expected switch fall-throughs
  2018-08-09 15:54 [PATCH] block: paride: pd: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-09 16:18 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2018-08-09 16:18 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Tim Waugh; +Cc: linux-block, linux-kernel

On 8/9/18 9:54 AM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2018-08-09 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 15:54 [PATCH] block: paride: pd: mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-09 16:18 ` Jens Axboe

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