linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: sprd: Add missing break in switch statement
@ 2019-02-11 18:50 Gustavo A. R. Silva
  2019-02-12  2:07 ` Baolin Wang
  2019-02-13  9:40 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-11 18:50 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Orson Zhai, Baolin Wang,
	Chunyan Zhang
  Cc: linux-gpio, linux-kernel, Gustavo A. R. Silva, Kees Cook

Fix the following warning by adding a missing break:

drivers/gpio/gpio-eic-sprd.c: In function ‘sprd_eic_irq_set_type’:
drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
   switch (flow_type) {
   ^~~~~~
drivers/gpio/gpio-eic-sprd.c:435:2: note: here
  default:
  ^~~~~~~

This patch is part of the ongoing efforts to enable
-Wimplicit-fallthrough.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/gpio/gpio-eic-sprd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
index e41223c05f6e..f0223cee9774 100644
--- a/drivers/gpio/gpio-eic-sprd.c
+++ b/drivers/gpio/gpio-eic-sprd.c
@@ -432,6 +432,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
 		default:
 			return -ENOTSUPP;
 		}
+		break;
 	default:
 		dev_err(chip->parent, "Unsupported EIC type.\n");
 		return -ENOTSUPP;
-- 
2.20.1


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

* Re: [PATCH] gpio: sprd: Add missing break in switch statement
  2019-02-11 18:50 [PATCH] gpio: sprd: Add missing break in switch statement Gustavo A. R. Silva
@ 2019-02-12  2:07 ` Baolin Wang
  2019-02-12  2:11   ` Gustavo A. R. Silva
  2019-02-13  9:40 ` Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Baolin Wang @ 2019-02-12  2:07 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Linus Walleij, Bartosz Golaszewski, Orson Zhai, Chunyan Zhang,
	open list:GPIO SUBSYSTEM, LKML, Kees Cook

Hi Gustavo,

On Tue, 12 Feb 2019 at 02:50, Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> Fix the following warning by adding a missing break:
>
> drivers/gpio/gpio-eic-sprd.c: In function ‘sprd_eic_irq_set_type’:
> drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    switch (flow_type) {
>    ^~~~~~
> drivers/gpio/gpio-eic-sprd.c:435:2: note: here
>   default:
>   ^~~~~~~
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Thanks for fixing my mistake.
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>

> ---
>  drivers/gpio/gpio-eic-sprd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
> index e41223c05f6e..f0223cee9774 100644
> --- a/drivers/gpio/gpio-eic-sprd.c
> +++ b/drivers/gpio/gpio-eic-sprd.c
> @@ -432,6 +432,7 @@ static int sprd_eic_irq_set_type(struct irq_data *data, unsigned int flow_type)
>                 default:
>                         return -ENOTSUPP;
>                 }
> +               break;
>         default:
>                 dev_err(chip->parent, "Unsupported EIC type.\n");
>                 return -ENOTSUPP;
> --
> 2.20.1
>


-- 
Baolin Wang
Best Regards

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

* Re: [PATCH] gpio: sprd: Add missing break in switch statement
  2019-02-12  2:07 ` Baolin Wang
@ 2019-02-12  2:11   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-12  2:11 UTC (permalink / raw)
  To: Baolin Wang
  Cc: Linus Walleij, Bartosz Golaszewski, Orson Zhai, Chunyan Zhang,
	open list:GPIO SUBSYSTEM, LKML, Kees Cook

Hi Baolin,

On 2/11/19 8:07 PM, Baolin Wang wrote:
> Hi Gustavo,
> 
> On Tue, 12 Feb 2019 at 02:50, Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> Fix the following warning by adding a missing break:
>>
>> drivers/gpio/gpio-eic-sprd.c: In function ‘sprd_eic_irq_set_type’:
>> drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>>    switch (flow_type) {
>>    ^~~~~~
>> drivers/gpio/gpio-eic-sprd.c:435:2: note: here
>>   default:
>>   ^~~~~~~
>>
>> This patch is part of the ongoing efforts to enable
>> -Wimplicit-fallthrough.
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> Thanks for fixing my mistake.
> Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
> 

Glad to help. :)

Thanks
--
Gustavo

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

* Re: [PATCH] gpio: sprd: Add missing break in switch statement
  2019-02-11 18:50 [PATCH] gpio: sprd: Add missing break in switch statement Gustavo A. R. Silva
  2019-02-12  2:07 ` Baolin Wang
@ 2019-02-13  9:40 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2019-02-13  9:40 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Bartosz Golaszewski, Orson Zhai, Baolin Wang, Chunyan Zhang,
	open list:GPIO SUBSYSTEM, linux-kernel, Kees Cook

On Mon, Feb 11, 2019 at 7:50 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:

> Fix the following warning by adding a missing break:
>
> drivers/gpio/gpio-eic-sprd.c: In function ‘sprd_eic_irq_set_type’:
> drivers/gpio/gpio-eic-sprd.c:403:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    switch (flow_type) {
>    ^~~~~~
> drivers/gpio/gpio-eic-sprd.c:435:2: note: here
>   default:
>   ^~~~~~~
>
> This patch is part of the ongoing efforts to enable
> -Wimplicit-fallthrough.
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Patch applied with Baolin's review tag.

Yours,
Linus Walleij

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

end of thread, other threads:[~2019-02-13  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 18:50 [PATCH] gpio: sprd: Add missing break in switch statement Gustavo A. R. Silva
2019-02-12  2:07 ` Baolin Wang
2019-02-12  2:11   ` Gustavo A. R. Silva
2019-02-13  9:40 ` Linus Walleij

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).