Skip to contentSkip to conversation

usb: gadget: atmel_usba_udc: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 3 participants 3 messages Aug 5, 2019 – Aug 16, 2019

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

PATCH 1/1 usb: gadget: atmel_usba_udc: Mark expected switch fall-through

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: at91_dt_defconfig arm):

drivers/usb/gadget/udc/atmel_usba_udc.c:329:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -0
index 503d275bc4c4..86ffc8307864 100644
@@ -327,6 +327,7 @@ static int usba_config_fifo_table(struct usba_udc *udc)
 	switch (fifo_mode) {
 	default:
 		fifo_mode = 0;
+		/* fall through */
 	case 0:
 		udc->fifo_cfg = NULL;
 		n = 0;
Signature · 1 line
2.22.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Gustavo A. R. Silva

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: at91_dt_defconfig arm):

drivers/usb/gadget/udc/atmel_usba_udc.c:329:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 19 lines
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -0
index 503d275bc4c4..86ffc8307864 100644
@@ -327,6 +327,7 @@ static int usba_config_fifo_table(struct usba_udc *udc)
 	switch (fifo_mode) {
 	default:
 		fifo_mode = 0;
+		/* fall through */
 	case 0:
 		udc->fifo_cfg = NULL;
 		n = 0;
Signature · 1 line
2.22.0
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 10 lines · Gustavo A. R. Silva

External E-Mail

Mark switch cases where we are expecting to fall through.

This patch fixes the following warning (Building: at91_dt_defconfig arm):

drivers/usb/gadget/udc/atmel_usba_udc.c:329:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

Quoted 17 lines
---
  drivers/usb/gadget/udc/atmel_usba_udc.c | 1 +
  1 file changed, 1 insertion(+)
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -0
index 503d275bc4c4..86ffc8307864 100644
@@ -327,6 +327,7 @@ static int usba_config_fifo_table(struct usba_udc *udc)
  	switch (fifo_mode) {
  	default:
  		fifo_mode = 0;
+		/* fall through */
  	case 0:
  		udc->fifo_cfg = NULL;
  		n = 0;