2020-11-19 17:11:45

by Gustavo A. R. Silva

[permalink] [raw]
Subject: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a break statement instead of letting the code fall
through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <[email protected]>
---
drivers/gpio/gpiolib-acpi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index 6cc5f91bfe2e..e37a57d0a2f0 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -233,6 +233,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity)
default:
break;
}
+ break;
default:
break;
}
--
2.27.0


2020-11-19 18:48:03

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang

On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
<[email protected]> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> by explicitly adding a break statement instead of letting the code fall
> through to the next case.

Reviewed-by: Andy Shevchenko <[email protected]>

> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/gpio/gpiolib-acpi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 6cc5f91bfe2e..e37a57d0a2f0 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -233,6 +233,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity)
> default:
> break;
> }
> + break;
> default:
> break;
> }
> --
> 2.27.0
>


--
With Best Regards,
Andy Shevchenko

2020-11-30 16:53:47

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang

On Thu, Nov 19, 2020 at 7:46 PM Andy Shevchenko
<[email protected]> wrote:
>
> On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
> <[email protected]> wrote:
> >
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> > by explicitly adding a break statement instead of letting the code fall
> > through to the next case.
>
> Reviewed-by: Andy Shevchenko <[email protected]>
>
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva <[email protected]>
> > ---
> > drivers/gpio/gpiolib-acpi.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> > index 6cc5f91bfe2e..e37a57d0a2f0 100644
> > --- a/drivers/gpio/gpiolib-acpi.c
> > +++ b/drivers/gpio/gpiolib-acpi.c
> > @@ -233,6 +233,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity)
> > default:
> > break;
> > }
> > + break;
> > default:
> > break;
> > }
> > --
> > 2.27.0
> >
>
>
> --
> With Best Regards,
> Andy Shevchenko

Are you taking it through your tree?

Bartosz

2020-11-30 17:17:36

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang

On Mon, Nov 30, 2020 at 6:51 PM Bartosz Golaszewski
<[email protected]> wrote:
>
> On Thu, Nov 19, 2020 at 7:46 PM Andy Shevchenko
> <[email protected]> wrote:
> >
> > On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
> > <[email protected]> wrote:
> > >
> > > In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> > > by explicitly adding a break statement instead of letting the code fall
> > > through to the next case.
> >
> > Reviewed-by: Andy Shevchenko <[email protected]>
> >
> > > Link: https://github.com/KSPP/linux/issues/115
> > > Signed-off-by: Gustavo A. R. Silva <[email protected]>
> > > ---
> > > drivers/gpio/gpiolib-acpi.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> > > index 6cc5f91bfe2e..e37a57d0a2f0 100644
> > > --- a/drivers/gpio/gpiolib-acpi.c
> > > +++ b/drivers/gpio/gpiolib-acpi.c
> > > @@ -233,6 +233,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity)
> > > default:
> > > break;
> > > }
> > > + break;
> > > default:
> > > break;
> > > }

> Are you taking it through your tree?

I don't have anything else, so please proceed directly. That's why I
gave the tag.

--
With Best Regards,
Andy Shevchenko

2020-12-01 14:54:35

by Bartosz Golaszewski

[permalink] [raw]
Subject: Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang

On Thu, Nov 19, 2020 at 6:07 PM Gustavo A. R. Silva
<[email protected]> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
> by explicitly adding a break statement instead of letting the code fall
> through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <[email protected]>
> ---
> drivers/gpio/gpiolib-acpi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> index 6cc5f91bfe2e..e37a57d0a2f0 100644
> --- a/drivers/gpio/gpiolib-acpi.c
> +++ b/drivers/gpio/gpiolib-acpi.c
> @@ -233,6 +233,7 @@ acpi_gpio_to_gpiod_flags(const struct acpi_resource_gpio *agpio, int polarity)
> default:
> break;
> }
> + break;
> default:
> break;
> }
> --
> 2.27.0
>

Applied, thanks!

Bartosz