Skip to contentSkip to conversation

power: max8925: mark expected switch fall-through

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Oct 4, 2018 – Oct 21, 2018 Power supply

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 power: max8925: mark expected switch fall-through

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

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

---
 drivers/power/supply/max8925_power.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/supply/max8925_power.c +1 -0
index 3b94620..39b4d5b 100644
@@ -124,6 +124,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
 	case MAX8925_IRQ_VCHG_THM_OK_F:
 		/* Battery is not ready yet */
 		dev_dbg(chip->dev, "Battery temperature is out of range\n");
+		/* Fall through */
 	case MAX8925_IRQ_VCHG_DC_OVP:
 		dev_dbg(chip->dev, "Error detection\n");
 		__set_charger(info, 0);
Signature · 1 line
2.7.4
#1 lore raw

Hi,

Quoted 6 lines · Gustavo A. R. Silva

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

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

---

Thanks, queued.

-- Sebastian

Quoted 18 lines
 drivers/power/supply/max8925_power.c | 1 +
 1 file changed, 1 insertion(+)
drivers/power/supply/max8925_power.c +1 -0
index 3b94620..39b4d5b 100644
@@ -124,6 +124,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
 	case MAX8925_IRQ_VCHG_THM_OK_F:
 		/* Battery is not ready yet */
 		dev_dbg(chip->dev, "Battery temperature is out of range\n");
+		/* Fall through */
 	case MAX8925_IRQ_VCHG_DC_OVP:
 		dev_dbg(chip->dev, "Error detection\n");
 		__set_charger(info, 0);
Signature · 1 line
2.7.4