Skip to contentSkip to conversation

i2c: designware-pcidrv: Mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jul 3, 2018

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

PATCH 1/1 i2c: designware-pcidrv: Mark expected switch fall-through

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

---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-designware-pcidrv.c +1 -0
index 86e1bd0..b4997be 100644
@@ -105,6 +105,7 @@ static int mfld_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
 	case 0x0817:
 		c->bus_cfg &= ~DW_IC_CON_SPEED_MASK;
 		c->bus_cfg |= DW_IC_CON_SPEED_STD;
+		/* fall through */
 	case 0x0818:
 	case 0x0819:
 		c->bus_num = pdev->device - 0x817 + 3;
Signature · 1 line
2.7.4
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases

where we are expecting to fall through.

Quoted 20 lines
---
 drivers/i2c/busses/i2c-designware-pcidrv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i2c/busses/i2c-designware-pcidrv.c +1 -0
index 86e1bd0..b4997be 100644
@@ -105,6 +105,7 @@ static int mfld_setup(struct pci_dev *pdev, struct
 dw_pci_controller *c)
 	case 0x0817:
 		c->bus_cfg &= ~DW_IC_CON_SPEED_MASK;
 		c->bus_cfg |= DW_IC_CON_SPEED_STD;
+		/* fall through */
 	case 0x0818:
 	case 0x0819:

c->bus_num = pdev->device - 0x817 + 3;

Signature · 2 lines
Andy Shevchenko <[email protected]>
Intel Finland Oy