diff mbox

mmc: sdhci-esdhc-imx: silence a false curly braces warning

Message ID 20150226203755.GD6820@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter Feb. 26, 2015, 8:37 p.m. UTC
Static checkers suggest that probably we intended to put curly braces
around the writel() to make it part of the else path.  But, I think
actually the indenting is off and the code works fine as is.

The stray tab was introduced in 0322191e6298 ('mmc: sdhci-esdhc-imx: add
sd3.0 SDR clock tuning support')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Aisheng Dong Feb. 27, 2015, 7:14 a.m. UTC | #1
On Thu, Feb 26, 2015 at 11:37:55PM +0300, Dan Carpenter wrote:
> Static checkers suggest that probably we intended to put curly braces
> around the writel() to make it part of the else path.  But, I think
> actually the indenting is off and the code works fine as is.
> 
> The stray tab was introduced in 0322191e6298 ('mmc: sdhci-esdhc-imx: add
> sd3.0 SDR clock tuning support')
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 

Yes, that's a mistake.
Thanks for the finding.
Acked-by: Dong Aisheng <b29396@freescale.com>

Regards
Dong Aisheng

> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 10ef824..9cce5cf 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -416,7 +416,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
>  			new_val |= ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
>  		else
>  			new_val &= ~ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
> -			writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
> +		writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
>  		return;
>  	case SDHCI_HOST_CONTROL2:
>  		new_val = readl(host->ioaddr + ESDHC_VENDOR_SPEC);
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson March 5, 2015, 1:48 p.m. UTC | #2
On 26 February 2015 at 21:37, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> Static checkers suggest that probably we intended to put curly braces
> around the writel() to make it part of the else path.  But, I think
> actually the indenting is off and the code works fine as is.
>
> The stray tab was introduced in 0322191e6298 ('mmc: sdhci-esdhc-imx: add
> sd3.0 SDR clock tuning support')
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks!

Kind regards
Uffe


>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 10ef824..9cce5cf 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -416,7 +416,7 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
>                         new_val |= ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
>                 else
>                         new_val &= ~ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
> -                       writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
> +               writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
>                 return;
>         case SDHCI_HOST_CONTROL2:
>                 new_val = readl(host->ioaddr + ESDHC_VENDOR_SPEC);
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 10ef824..9cce5cf 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -416,7 +416,7 @@  static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
 			new_val |= ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
 		else
 			new_val &= ~ESDHC_VENDOR_SPEC_FRC_SDCLK_ON;
-			writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
+		writel(new_val, host->ioaddr + ESDHC_VENDOR_SPEC);
 		return;
 	case SDHCI_HOST_CONTROL2:
 		new_val = readl(host->ioaddr + ESDHC_VENDOR_SPEC);