Skip to contentSkip to conversation

pinctrl: baytrail: Mark expected switch fall-throughs

PATCH In review Gustavo A. R. Silva 3 participants 4 messages Jul 5, 2018 – Jul 9, 2018

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

PATCH 1/1 pinctrl: baytrail: Mark expected switch fall-throughs

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

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

---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pinctrl/intel/pinctrl-baytrail.c +2 -0
index 6b52ea1..3420e7e 100644
@@ -1542,11 +1542,13 @@ static void byt_irq_unmask(struct irq_data *d)
 	switch (irqd_get_trigger_type(d)) {
 	case IRQ_TYPE_LEVEL_HIGH:
 		value |= BYT_TRIG_LVL;
+		/* fall through */
 	case IRQ_TYPE_EDGE_RISING:
 		value |= BYT_TRIG_POS;
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
 		value |= BYT_TRIG_LVL;
+		/* fall through */
 	case IRQ_TYPE_EDGE_FALLING:
 		value |= BYT_TRIG_NEG;
 		break;
Signature · 1 line
2.7.4
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 5 lines · Gustavo A. R. Silva

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

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

I hope these special tags are accepted by the community at large. Has there been discussion?

Quoted 1 line

Patch applied with Mika's ACK.

Yours,
Linus Walleij

#3 lore raw

Hi Linus,

Quoted 12 lines · Linus Walleij
Quoted 5 lines · Gustavo A. R. Silva

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

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

I hope these special tags are accepted by the community at large. Has there been discussion?

Yes. This is information we want to keep on the changelog:

http://lkml.iu.edu/hypermail/linux/kernel/1710.3/04013.html

Quoted 4 lines
Quoted 1 line

Patch applied with Mika's ACK.

Thanks
--
Gustavo