* [PATCH] power: supply: ab8500_charger: Mark expected switch fall-through
@ 2019-08-05 19:44 Gustavo A. R. Silva
2019-09-02 8:00 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2019-08-05 19:44 UTC (permalink / raw)
To: Sebastian Reichel; +Cc: linux-pm, linux-kernel, Gustavo A. R. Silva
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: allmodconfig arm):
drivers/power/supply/ab8500_charger.c:738:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
drivers/power/supply/ab8500_charger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 30de448de802..1be75a2fed9b 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -742,6 +742,7 @@ static int ab8500_charger_max_usb_curr(struct ab8500_charger *di,
USB_CH_IP_CUR_LVL_1P5;
break;
}
+ /* else, fall through */
case USB_STAT_HM_IDGND:
dev_err(di->dev, "USB Type - Charging not allowed\n");
di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P05;
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power: supply: ab8500_charger: Mark expected switch fall-through
2019-08-05 19:44 [PATCH] power: supply: ab8500_charger: Mark expected switch fall-through Gustavo A. R. Silva
@ 2019-09-02 8:00 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2019-09-02 8:00 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
Hi,
On Mon, Aug 05, 2019 at 02:44:18PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: allmodconfig arm):
>
> drivers/power/supply/ab8500_charger.c:738:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---
Thanks, queued.
-- Sebastian
> drivers/power/supply/ab8500_charger.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 30de448de802..1be75a2fed9b 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -742,6 +742,7 @@ static int ab8500_charger_max_usb_curr(struct ab8500_charger *di,
> USB_CH_IP_CUR_LVL_1P5;
> break;
> }
> + /* else, fall through */
> case USB_STAT_HM_IDGND:
> dev_err(di->dev, "USB Type - Charging not allowed\n");
> di->max_usb_in_curr.usb_type_max = USB_CH_IP_CUR_LVL_0P05;
> --
> 2.22.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-02 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 19:44 [PATCH] power: supply: ab8500_charger: Mark expected switch fall-through Gustavo A. R. Silva
2019-09-02 8:00 ` Sebastian Reichel
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).