Skip to contentSkip to conversation

wimax: usb-fw: mark expected switch fall-through

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Aug 9, 2018 – Aug 11, 2018

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

PATCH 1/1 wimax: usb-fw: mark expected switch fall-through

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

Notice that in this particular case, I placed the "fall through" annotation at the bottom of the case, which is what GCC is expecting to find.

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

---
 drivers/net/wimax/i2400m/usb-fw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wimax/i2400m/usb-fw.c +1 -1
index 502c346..529ebca 100644
@@ -130,12 +130,12 @@ ssize_t i2400mu_tx_bulk_out(struct i2400mu *i2400mu, void *buf, size_t buf_size)
 			dev_err(dev, "BM-CMD: too many stalls in "
 				"URB; resetting device\n");
 			usb_queue_reset_device(i2400mu->usb_iface);
-			/* fallthrough */
 		} else {
 			usb_clear_halt(i2400mu->usb_dev, pipe);
 			msleep(10);	/* give the device some time */
 			goto retry;
 		}
+		/* fall through */
 	case -EINVAL:			/* while removing driver */
 	case -ENODEV:			/* dev disconnect ... */
 	case -ENOENT:			/* just ignore it */
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

From: "Gustavo A. R. Silva" <[email protected]>
Date: Thu, 9 Aug 2018 10:39:44 -0500

Quoted 9 lines

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

Notice that in this particular case, I placed the "fall through" annotation at the bottom of the case, which is what GCC is expecting to find.

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

Applied.