Message ID | 9611e213448b27f3f08a010c683d566c712bdbbb.1605896059.git.gustavoars@kernel.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | Fix fall-through warnings for Clang | expand |
On Fri, Nov 20, 2020 at 12:25:16PM -0600, Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > warnings by explicitly adding a break and a fallthrough statements > instead of just letting the code fall through to the next case. Shouldn't this go via GPIO tree?
On 11/20/20 12:56, Andy Shevchenko wrote: > On Fri, Nov 20, 2020 at 12:25:16PM -0600, Gustavo A. R. Silva wrote: >> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple >> warnings by explicitly adding a break and a fallthrough statements >> instead of just letting the code fall through to the next case. > > Shouldn't this go via GPIO tree? Yeah. Actually, you can ignore this patch, as I already sent two separate patches for this: https://lore.kernel.org/lkml/20201119170901.GA22703@embeddedor/ https://lore.kernel.org/lkml/20201119170739.GA22665@embeddedor/ I noticed this immediately after sending this out. Thanks -- Gustavo
diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c index d5359341cc6b..678ddd375891 100644 --- a/drivers/gpio/gpio-ath79.c +++ b/drivers/gpio/gpio-ath79.c @@ -123,6 +123,7 @@ static int ath79_gpio_irq_set_type(struct irq_data *data, switch (flow_type) { case IRQ_TYPE_EDGE_RISING: polarity |= mask; + fallthrough; case IRQ_TYPE_EDGE_FALLING: case IRQ_TYPE_EDGE_BOTH: break; diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 834a12f3219e..23fa9df8241d 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -548,6 +548,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio) default: break; } + break; default: break; }
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a break and a fallthrough statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> --- drivers/gpio/gpio-ath79.c | 1 + drivers/gpio/gpiolib-acpi.c | 1 + 2 files changed, 2 insertions(+)