diff mbox series

mmc: meson-mx-sdio: mark expected switch fall-through

Message ID 20181005100903.GA32057@embeddedor.com (mailing list archive)
State Not Applicable
Headers show
Series mmc: meson-mx-sdio: mark expected switch fall-through | expand

Commit Message

Gustavo A. R. Silva Oct. 5, 2018, 10:09 a.m. UTC
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(-)

Comments

Ulf Hansson Oct. 5, 2018, 1:54 p.m. UTC | #1
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
>
Martin Blumenstingl Oct. 5, 2018, 9:10 p.m. UTC | #2
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
Gustavo A. R. Silva Oct. 5, 2018, 9:20 p.m. UTC | #3
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
diff mbox series

Patch

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,