linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang
@ 2020-11-19 17:07 Gustavo A. R. Silva
  2020-11-19 18:47 ` Andy Shevchenko
  2020-12-01 14:48 ` Bartosz Golaszewski
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo A. R. Silva @ 2020-11-19 17:07 UTC (permalink / raw)
  To: Mika Westerberg, Andy Shevchenko, Linus Walleij, Bartosz Golaszewski
  Cc: linux-gpio, linux-acpi, linux-kernel, Gustavo A. R. Silva,
	linux-hardening

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 <gustavoars@kernel.org>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang
  2020-11-19 17:07 [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang Gustavo A. R. Silva
@ 2020-11-19 18:47 ` Andy Shevchenko
  2020-11-30 16:51   ` Bartosz Golaszewski
  2020-12-01 14:48 ` Bartosz Golaszewski
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2020-11-19 18:47 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij,
	Bartosz Golaszewski, open list:GPIO SUBSYSTEM,
	ACPI Devel Maling List, Linux Kernel Mailing List,
	linux-hardening

On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
<gustavoars@kernel.org> 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 <andy.shevchenko@gmail.com>

> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang
  2020-11-19 18:47 ` Andy Shevchenko
@ 2020-11-30 16:51   ` Bartosz Golaszewski
  2020-11-30 17:15     ` Andy Shevchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-11-30 16:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Gustavo A. R. Silva, Mika Westerberg, Andy Shevchenko,
	Linus Walleij, open list:GPIO SUBSYSTEM, ACPI Devel Maling List,
	Linux Kernel Mailing List, linux-hardening

On Thu, Nov 19, 2020 at 7:46 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
> <gustavoars@kernel.org> 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 <andy.shevchenko@gmail.com>
>
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> > ---
> >  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang
  2020-11-30 16:51   ` Bartosz Golaszewski
@ 2020-11-30 17:15     ` Andy Shevchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-11-30 17:15 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Gustavo A. R. Silva, Mika Westerberg, Andy Shevchenko,
	Linus Walleij, open list:GPIO SUBSYSTEM, ACPI Devel Maling List,
	Linux Kernel Mailing List, linux-hardening

On Mon, Nov 30, 2020 at 6:51 PM Bartosz Golaszewski
<bgolaszewski@baylibre.com> wrote:
>
> On Thu, Nov 19, 2020 at 7:46 PM Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> >
> > On Thu, Nov 19, 2020 at 7:08 PM Gustavo A. R. Silva
> > <gustavoars@kernel.org> 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 <andy.shevchenko@gmail.com>
> >
> > > Link: https://github.com/KSPP/linux/issues/115
> > > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> > > ---
> > >  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang
  2020-11-19 17:07 [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang Gustavo A. R. Silva
  2020-11-19 18:47 ` Andy Shevchenko
@ 2020-12-01 14:48 ` Bartosz Golaszewski
  1 sibling, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-12-01 14:48 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Mika Westerberg, Andy Shevchenko, Linus Walleij, linux-gpio,
	ACPI Devel Maling List, LKML, linux-hardening

On Thu, Nov 19, 2020 at 6:07 PM Gustavo A. R. Silva
<gustavoars@kernel.org> 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 <gustavoars@kernel.org>
> ---
>  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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-01 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 17:07 [PATCH][next] gpiolib: acpi: Fix fall-through warnings for Clang Gustavo A. R. Silva
2020-11-19 18:47 ` Andy Shevchenko
2020-11-30 16:51   ` Bartosz Golaszewski
2020-11-30 17:15     ` Andy Shevchenko
2020-12-01 14:48 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).