gpio: mark expected switch fall-throughs
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Fri, 13 Oct 2017 20:43:53 +0000 (15:43 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 19 Oct 2017 20:32:40 +0000 (22:32 +0200)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-aspeed.c
drivers/gpio/gpio-ath79.c
drivers/gpio/gpio-stmpe.c

index bfc53995064af76cdb7866acead0c0a9b8df1972..00dc1c020198579d4e931a97e994ea2cd10ff9c5 100644 (file)
@@ -411,13 +411,16 @@ static int aspeed_gpio_set_type(struct irq_data *d, unsigned int type)
        switch (type & IRQ_TYPE_SENSE_MASK) {
        case IRQ_TYPE_EDGE_BOTH:
                type2 |= bit;
+               /* fall through */
        case IRQ_TYPE_EDGE_RISING:
                type0 |= bit;
+               /* fall through */
        case IRQ_TYPE_EDGE_FALLING:
                handler = handle_edge_irq;
                break;
        case IRQ_TYPE_LEVEL_HIGH:
                type0 |= bit;
+               /* fall through */
        case IRQ_TYPE_LEVEL_LOW:
                type1 |= bit;
                handler = handle_level_irq;
index f33d4a5fe6718e29484e9d42fdb439def1eb4666..02e56e0c793ae985802172f2192b9f186fc6c526 100644 (file)
@@ -132,6 +132,7 @@ static int ath79_gpio_irq_set_type(struct irq_data *data,
 
        case IRQ_TYPE_LEVEL_HIGH:
                polarity |= mask;
+               /* fall through */
        case IRQ_TYPE_LEVEL_LOW:
                type |= mask;
                break;
index 16cbc5702865cd2765ad5aeabcd98460623eb353..001a89db516156a76dc787429c0b7c55d7aa99dc 100644 (file)
@@ -299,7 +299,7 @@ static void stmpe_dbg_show_one(struct seq_file *s,
                        if (ret < 0)
                                return;
                        edge_det = !!(ret & mask);
-
+                       /* fall through */
                case STMPE1801:
                        rise_reg = stmpe->regs[STMPE_IDX_GPRER_LSB + bank];
                        fall_reg = stmpe->regs[STMPE_IDX_GPFER_LSB + bank];
@@ -312,7 +312,7 @@ static void stmpe_dbg_show_one(struct seq_file *s,
                        if (ret < 0)
                                return;
                        fall = !!(ret & mask);
-
+                       /* fall through */
                case STMPE801:
                case STMPE1600:
                        irqen_reg = stmpe->regs[STMPE_IDX_IEGPIOR_LSB + bank];