Skip to contentSkip to conversation

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

PATCH Applied Dan Carpenter 3 participants 3 messages Feb 26, 2015 – Mar 5, 2015

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

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

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

drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
index 10ef824..9cce5cf 100644
@@ -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);
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Dan Carpenter

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

Yes, that's a mistake.
Thanks for the finding.

Regards
Dong Aisheng

Quoted 13 lines
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
index 10ef824..9cce5cf 100644
@@ -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);
Applied
#2 lore raw
In reply to Dan Carpenter
Quoted 8 lines · Dan Carpenter

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

Applied, thanks!

Kind regards
Uffe

Quoted 14 lines
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
index 10ef824..9cce5cf 100644
@@ -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);