Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] pinctrl/qcom: Fix -Wimplicit-fallthrough
@ 2019-08-17  8:25 Alex Dewar
  2019-08-18  0:12 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Dewar @ 2019-08-17  8:25 UTC (permalink / raw)
  To: agross, linus.walleij, bjorn.andersson
  Cc: linux-arm-msm, linux-gpio, linux-kernel, Alex Dewar

In pinctrl-spmi-gpio.c there is a switch case which is obviously
intended to fall through to the next label. Add a comment to suppress
-Wimplicit-fallthrough warning.

Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
---
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index f39da87ea185..b035dd5e25b8 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -813,6 +813,7 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
 	switch (subtype) {
 	case PMIC_GPIO_SUBTYPE_GPIO_4CH:
 		pad->have_buffer = true;
+		/* FALLS THROUGH */
 	case PMIC_GPIO_SUBTYPE_GPIOC_4CH:
 		pad->num_sources = 4;
 		break;
--
2.22.1


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

* Re: [PATCH] pinctrl/qcom: Fix -Wimplicit-fallthrough
  2019-08-17  8:25 [PATCH] pinctrl/qcom: Fix -Wimplicit-fallthrough Alex Dewar
@ 2019-08-18  0:12 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2019-08-18  0:12 UTC (permalink / raw)
  To: Alex Dewar; +Cc: agross, linus.walleij, linux-arm-msm, linux-gpio, linux-kernel

On Sat 17 Aug 01:25 PDT 2019, Alex Dewar wrote:

> In pinctrl-spmi-gpio.c there is a switch case which is obviously
> intended to fall through to the next label. Add a comment to suppress
> -Wimplicit-fallthrough warning.
> 

Thanks for your patch Alex, this was fixed in 6161dc03587b ("pinctrl:
qcom: spmi-gpio: Mark expected switch fall-through")

Regards,
Bjorn

> Signed-off-by: Alex Dewar <alex.dewar@gmx.co.uk>
> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index f39da87ea185..b035dd5e25b8 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -813,6 +813,7 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
>  	switch (subtype) {
>  	case PMIC_GPIO_SUBTYPE_GPIO_4CH:
>  		pad->have_buffer = true;
> +		/* FALLS THROUGH */
>  	case PMIC_GPIO_SUBTYPE_GPIOC_4CH:
>  		pad->num_sources = 4;
>  		break;
> --
> 2.22.1
> 

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-17  8:25 [PATCH] pinctrl/qcom: Fix -Wimplicit-fallthrough Alex Dewar
2019-08-18  0:12 ` Bjorn Andersson

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org linux-arm-msm@archiver.kernel.org
	public-inbox-index linux-arm-msm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox