diff mbox series

aoe: mark expected switch fall-through

Message ID 20180801223020.GA11729@embeddedor.com (mailing list archive)
State New, archived
Headers show
Series aoe: mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Aug. 1, 2018, 10:30 p.m. UTC
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 114722 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/block/aoe/aoecmd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jens Axboe Aug. 2, 2018, 3:59 p.m. UTC | #1
On 8/1/18 4:30 PM, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.

Applied for 4.19, thanks.
Ed Cashin Aug. 3, 2018, 12:26 a.m. UTC | #2
On Wed, Aug 1, 2018 at 6:30 PM Gustavo A. R. Silva <gustavo@embeddedor.com>
wrote:

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


OK, thanks.


>
> diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
> index 096882e..136dc50 100644
> --- a/drivers/block/aoe/aoecmd.c
> +++ b/drivers/block/aoe/aoecmd.c
> @@ -1137,6 +1137,7 @@ noskb:            if (buf)
>                         break;
>                 }
>                 bvcpy(skb, f->buf->bio, f->iter, n);
> +               /* fall through */
>         case ATA_CMD_PIO_WRITE:
>         case ATA_CMD_PIO_WRITE_EXT:
>                 spin_lock_irq(&d->lock);
> --
> 2.7.4
>
>
diff mbox series

Patch

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 096882e..136dc50 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -1137,6 +1137,7 @@  noskb:		if (buf)
 			break;
 		}
 		bvcpy(skb, f->buf->bio, f->iter, n);
+		/* fall through */
 	case ATA_CMD_PIO_WRITE:
 	case ATA_CMD_PIO_WRITE_EXT:
 		spin_lock_irq(&d->lock);