linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through
@ 2018-10-05 10:09 Gustavo A. R. Silva
  2018-10-05 13:54 ` Ulf Hansson
  2018-10-05 21:10 ` Martin Blumenstingl
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-05 10:09 UTC (permalink / raw)
  To: Ulf Hansson, Carlo Caione, Kevin Hilman
  Cc: linux-mmc, linux-arm-kernel, linux-amlogic, linux-kernel,
	Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced the "fall-through:"
comment with a proper "fall through", which is what GCC is
expecting to find.

Addresses-Coverity-ID: 1373880 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/mmc/host/meson-mx-sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 2cfec33..abe253c 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -294,7 +294,7 @@ static void meson_mx_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 	switch (ios->power_mode) {
 	case MMC_POWER_OFF:
 		vdd = 0;
-		/* fall-through: */
+		/* fall through */
 	case MMC_POWER_UP:
 		if (!IS_ERR(mmc->supply.vmmc)) {
 			host->error = mmc_regulator_set_ocr(mmc,
-- 
2.7.4


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

* Re: [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through
  2018-10-05 10:09 [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-10-05 13:54 ` Ulf Hansson
  2018-10-05 21:10 ` Martin Blumenstingl
  1 sibling, 0 replies; 4+ messages in thread
From: Ulf Hansson @ 2018-10-05 13:54 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Carlo Caione, Kevin Hilman, linux-mmc, Linux ARM,
	open list:ARM/Amlogic Meson...,
	Linux Kernel Mailing List

On 5 October 2018 at 12:09, Gustavo A. R. Silva <gustavo@embeddedor.com> wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I replaced the "fall-through:"
> comment with a proper "fall through", which is what GCC is
> expecting to find.
>
> Addresses-Coverity-ID: 1373880 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>


Applied for next, thanks!

Kind regards
Uffe

> ---
>  drivers/mmc/host/meson-mx-sdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
> index 2cfec33..abe253c 100644
> --- a/drivers/mmc/host/meson-mx-sdio.c
> +++ b/drivers/mmc/host/meson-mx-sdio.c
> @@ -294,7 +294,7 @@ static void meson_mx_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
>         switch (ios->power_mode) {
>         case MMC_POWER_OFF:
>                 vdd = 0;
> -               /* fall-through: */
> +               /* fall through */
>         case MMC_POWER_UP:
>                 if (!IS_ERR(mmc->supply.vmmc)) {
>                         host->error = mmc_regulator_set_ocr(mmc,
> --
> 2.7.4
>

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

* Re: [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through
  2018-10-05 10:09 [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through Gustavo A. R. Silva
  2018-10-05 13:54 ` Ulf Hansson
@ 2018-10-05 21:10 ` Martin Blumenstingl
  2018-10-05 21:20   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Blumenstingl @ 2018-10-05 21:10 UTC (permalink / raw)
  To: gustavo
  Cc: ulf.hansson, carlo, khilman, linux-amlogic, linux-mmc,
	linux-kernel, linux-arm-kernel

On Fri, Oct 5, 2018 at 12:15 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:
>
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Notice that in this particular case, I replaced the "fall-through:"
> comment with a proper "fall through", which is what GCC is
> expecting to find.
>
> Addresses-Coverity-ID: 1373880 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

thank you for taking care of this!


Regards
Martin

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

* Re: [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through
  2018-10-05 21:10 ` Martin Blumenstingl
@ 2018-10-05 21:20   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-05 21:20 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: ulf.hansson, carlo, khilman, linux-amlogic, linux-mmc,
	linux-kernel, linux-arm-kernel

Hi Martin,

On 10/5/18 11:10 PM, Martin Blumenstingl wrote:
> On Fri, Oct 5, 2018 at 12:15 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
>>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Notice that in this particular case, I replaced the "fall-through:"
>> comment with a proper "fall through", which is what GCC is
>> expecting to find.
>>
>> Addresses-Coverity-ID: 1373880 ("Missing break in switch")
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> 
> thank you for taking care of this!
> 

Glad to help. :)

Thanks
--
Gustavo

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

end of thread, other threads:[~2018-10-05 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 10:09 [PATCH] mmc: meson-mx-sdio: mark expected switch fall-through Gustavo A. R. Silva
2018-10-05 13:54 ` Ulf Hansson
2018-10-05 21:10 ` Martin Blumenstingl
2018-10-05 21:20   ` Gustavo A. R. Silva

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