gpio: sprd: Add missing break in switch statement
Subsystems (2)
PATCH 1/1 gpio: sprd: Add missing break in switch statement
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.
--- drivers/gpio/gpio-eic-sprd.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpio/gpio-eic-sprd.c +1 -0
@@ -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 ;
Signature · 1 line
2.20.1
Hi Gustavo,
Quoted 7 lines · Gustavo A. R. Silva
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) { ^~~~~~
Quoted 8 lines
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 <[email protected]>
Thanks for fixing my mistake.
Quoted 19 lines
--- drivers/gpio/gpio-eic-sprd.c | 1 + 1 file changed, 1 insertion(+)drivers/gpio/gpio-eic-sprd.c +1
-1@@ -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
Signature · 2 lines
Baolin Wang Best Regards
Hi Baolin,
Quoted 15 lines · Baolin Wang
Hi Gustavo,
Quoted 11 lines · Gustavo A. R. Silva
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:
^~~~~~~
Quoted 8 lines
Quoted 4 lines
This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
Signed-off-by Gustavo A. R. Silva <[email protected]>Thanks for fixing my mistake.
Reviewed-by Baolin Wang <[email protected]>
Glad to help. :)
Thanks
--
Gustavo
Quoted 6 lines · Gustavo A. R. Silva
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) { ^~~~~~
Quoted 8 lines
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 <[email protected]>
Patch applied with Baolin's review tag.
Yours,
Linus Walleij