Skip to contentSkip to conversation

aoe: mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Aug 1, 2018 – Aug 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aoe: mark expected switch fall-through

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

Addresses-Coverity-ID: 114722 ("Missing break in switch")

---
 drivers/block/aoe/aoecmd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/aoe/aoecmd.c +1 -0
index 096882e..136dc50 100644
@@ -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);
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 2 lines · Gustavo A. R. Silva

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

Applied for 4.19, thanks.

Signature · 1 line
Jens Axboe
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 2 lines · Gustavo A. R. Silva

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

OK, thanks.

Quoted 17 lines
drivers/block/aoe/aoecmd.c +1 -1
index 096882e..136dc50 100644
@@ -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

Signature · 1 line
  Ed Cashin <[email protected]>