diff mbox series

[098/141] mmc: sdhci-of-arasan: Fix fall-through warnings for Clang

Message ID 387cab3a466038aa5d1fc34b8b6a7c4f693826ea.1605896060.git.gustavoars@kernel.org (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Gustavo A. R. Silva Nov. 20, 2020, 6:37 p.m. UTC
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of
letting the code fall through to the next case.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michal Simek Nov. 23, 2020, 7 a.m. UTC | #1
On 20. 11. 20 19:37, Gustavo A. R. Silva wrote:
> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
> warnings by explicitly adding multiple break statements instead of
> letting the code fall through to the next case.
> 
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> ---
>  drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 829ccef87426..1f7e42b6ced5 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -627,6 +627,7 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
>  	case MMC_TIMING_MMC_HS200:
>  		/* For 200MHz clock, 8 Taps are available */
>  		tap_max = 8;
> +		break;
>  	default:
>  		break;
>  	}
> @@ -695,6 +696,7 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)
>  	case MMC_TIMING_MMC_HS200:
>  		/* For 200MHz clock, 30 Taps are available */
>  		tap_max = 30;
> +		break;
>  	default:
>  		break;
>  	}
> @@ -760,6 +762,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
>  	case MMC_TIMING_MMC_HS200:
>  		/* For 200MHz clock, 8 Taps are available */
>  		tap_max = 8;
> +		break;
>  	default:
>  		break;
>  	}
> @@ -831,6 +834,7 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
>  	case MMC_TIMING_MMC_HS200:
>  		/* For 200MHz clock, 30 Taps are available */
>  		tap_max = 30;
> +		break;
>  	default:
>  		break;
>  	}
> 

No problem with it.

Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Gustavo A. R. Silva Nov. 23, 2020, 10:59 p.m. UTC | #2
On Mon, Nov 23, 2020 at 08:00:35AM +0100, Michal Simek wrote:
> 
> 
> On 20. 11. 20 19:37, Gustavo A. R. Silva wrote:
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
> > warnings by explicitly adding multiple break statements instead of
> > letting the code fall through to the next case.
> > 
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> > ---
> >  drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> > index 829ccef87426..1f7e42b6ced5 100644
> > --- a/drivers/mmc/host/sdhci-of-arasan.c
> > +++ b/drivers/mmc/host/sdhci-of-arasan.c
> > @@ -627,6 +627,7 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
> >  	case MMC_TIMING_MMC_HS200:
> >  		/* For 200MHz clock, 8 Taps are available */
> >  		tap_max = 8;
> > +		break;
> >  	default:
> >  		break;
> >  	}
> > @@ -695,6 +696,7 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)
> >  	case MMC_TIMING_MMC_HS200:
> >  		/* For 200MHz clock, 30 Taps are available */
> >  		tap_max = 30;
> > +		break;
> >  	default:
> >  		break;
> >  	}
> > @@ -760,6 +762,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
> >  	case MMC_TIMING_MMC_HS200:
> >  		/* For 200MHz clock, 8 Taps are available */
> >  		tap_max = 8;
> > +		break;
> >  	default:
> >  		break;
> >  	}
> > @@ -831,6 +834,7 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
> >  	case MMC_TIMING_MMC_HS200:
> >  		/* For 200MHz clock, 30 Taps are available */
> >  		tap_max = 30;
> > +		break;
> >  	default:
> >  		break;
> >  	}
> > 
> 
> No problem with it.
> 
> Acked-by: Michal Simek <michal.simek@xilinx.com>

Thanks, Michal.
--
Gustavo
Ulf Hansson Nov. 24, 2020, 2:25 p.m. UTC | #3
On Fri, 20 Nov 2020 at 19:37, Gustavo A. R. Silva <gustavoars@kernel.org> wrote:
>
> In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
> warnings by explicitly adding multiple break statements instead of
> letting the code fall through to the next case.
>
> Link: https://github.com/KSPP/linux/issues/115
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-of-arasan.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 829ccef87426..1f7e42b6ced5 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -627,6 +627,7 @@ static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
>         case MMC_TIMING_MMC_HS200:
>                 /* For 200MHz clock, 8 Taps are available */
>                 tap_max = 8;
> +               break;
>         default:
>                 break;
>         }
> @@ -695,6 +696,7 @@ static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)
>         case MMC_TIMING_MMC_HS200:
>                 /* For 200MHz clock, 30 Taps are available */
>                 tap_max = 30;
> +               break;
>         default:
>                 break;
>         }
> @@ -760,6 +762,7 @@ static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
>         case MMC_TIMING_MMC_HS200:
>                 /* For 200MHz clock, 8 Taps are available */
>                 tap_max = 8;
> +               break;
>         default:
>                 break;
>         }
> @@ -831,6 +834,7 @@ static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
>         case MMC_TIMING_MMC_HS200:
>                 /* For 200MHz clock, 30 Taps are available */
>                 tap_max = 30;
> +               break;
>         default:
>                 break;
>         }
> --
> 2.27.0
>
Gustavo A. R. Silva Nov. 24, 2020, 2:36 p.m. UTC | #4
On Tue, Nov 24, 2020 at 03:25:32PM +0100, Ulf Hansson wrote:
> On Fri, 20 Nov 2020 at 19:37, Gustavo A. R. Silva <gustavoars@kernel.org> wrote:
> >
> > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
> > warnings by explicitly adding multiple break statements instead of
> > letting the code fall through to the next case.
> >
> > Link: https://github.com/KSPP/linux/issues/115
> > Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> 
> Applied for next, thanks!

Thank you, Uffe.
--
Gustavo
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 829ccef87426..1f7e42b6ced5 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -627,6 +627,7 @@  static int sdhci_zynqmp_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
 	case MMC_TIMING_MMC_HS200:
 		/* For 200MHz clock, 8 Taps are available */
 		tap_max = 8;
+		break;
 	default:
 		break;
 	}
@@ -695,6 +696,7 @@  static int sdhci_zynqmp_sampleclk_set_phase(struct clk_hw *hw, int degrees)
 	case MMC_TIMING_MMC_HS200:
 		/* For 200MHz clock, 30 Taps are available */
 		tap_max = 30;
+		break;
 	default:
 		break;
 	}
@@ -760,6 +762,7 @@  static int sdhci_versal_sdcardclk_set_phase(struct clk_hw *hw, int degrees)
 	case MMC_TIMING_MMC_HS200:
 		/* For 200MHz clock, 8 Taps are available */
 		tap_max = 8;
+		break;
 	default:
 		break;
 	}
@@ -831,6 +834,7 @@  static int sdhci_versal_sampleclk_set_phase(struct clk_hw *hw, int degrees)
 	case MMC_TIMING_MMC_HS200:
 		/* For 200MHz clock, 30 Taps are available */
 		tap_max = 30;
+		break;
 	default:
 		break;
 	}