Skip to contentSkip to conversation

mmc: sdhci-esdhc-imx: fix few build warnings

PATCH In review Haibo Chen 2 participants 2 messages May 16, 2025 – May 19, 2025

Subsystems (4)
lore
Share & tools
lore

Haibo Chen

author maintainer
#0 lore raw

PATCH v2 1/1 mmc: sdhci-esdhc-imx: fix few build warnings

drivers/mmc/host/sdhci-esdhc-imx.c:1566 sdhci_esdhc_imx_hwinit() warn: inconsistent indenting drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_min'. drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_max'.

Fixes be953af79cc6 ("mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning")
Fixes 541a95e64d76 ("mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing")
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +4 -4
index c0160c69a027826c4099c9bcf82cd4d83f1113fd..741db169f44d9c9c1e5e1dee591b72221fa1e2b9 100644
@@ -1216,8 +1216,8 @@ static int esdhc_executing_tuning(struct sdhci_host *host, u32 opcode)
 	int win_length, target_min, target_max, target_win_length;
 	u32 clk_tune_ctrl_status, temp;
 
-	min = ESDHC_TUNE_CTRL_MIN;
-	max = ESDHC_TUNE_CTRL_MIN;
+	min = target_min = ESDHC_TUNE_CTRL_MIN;
+	max = target_max = ESDHC_TUNE_CTRL_MIN;
 	target_win_length = 0;
 	while (max < ESDHC_TUNE_CTRL_MAX) {
 		/* find the mininum delay first which can pass tuning */
@@ -1591,8 +1591,8 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
 			 * wider, give auto tuning enough space to handle the sample
 			 * point shift cause by temperature change.
 			 */
-			 tmp &= ~ESDHC_TUNING_WINDOW_MASK;
-			 tmp |= FIELD_PREP(ESDHC_TUNING_WINDOW_MASK, ESDHC_AUTO_TUNING_WINDOW);
+			tmp &= ~ESDHC_TUNING_WINDOW_MASK;
+			tmp |= FIELD_PREP(ESDHC_TUNING_WINDOW_MASK, ESDHC_AUTO_TUNING_WINDOW);
 
 			/* Disable the CMD CRC check for tuning, if not, need to
 			 * add some delay after every tuning command, because

---
base-commit: 484803582c77061b470ac64a634f25f89715be3f
change-id: 20250516-b4-usdhc-bcd8cea08ed6

Best regards,

Signature · 1 line
Haibo Chen <[email protected]>
#1 lore raw
Quoted 11 lines · Haibo Chen

drivers/mmc/host/sdhci-esdhc-imx.c:1566 sdhci_esdhc_imx_hwinit() warn: inconsistent indenting drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_min'. drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_max'.

Fixes be953af79cc6 ("mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning")
Fixes 541a95e64d76 ("mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing")

Applied for next, thanks!

Kind regards
Uffe

Quoted 39 lines
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/mmc/host/sdhci-esdhc-imx.c +4 -5
index c0160c69a027826c4099c9bcf82cd4d83f1113fd..741db169f44d9c9c1e5e1dee591b72221fa1e2b9 100644
@@ -1216,8 +1216,8 @@ static int esdhc_executing_tuning(struct sdhci_host *host, u32 opcode)
        int win_length, target_min, target_max, target_win_length;
        u32 clk_tune_ctrl_status, temp;
 
-       min = ESDHC_TUNE_CTRL_MIN;
-       max = ESDHC_TUNE_CTRL_MIN;
+       min = target_min = ESDHC_TUNE_CTRL_MIN;
+       max = target_max = ESDHC_TUNE_CTRL_MIN;
        target_win_length = 0;
        while (max < ESDHC_TUNE_CTRL_MAX) {
                /* find the mininum delay first which can pass tuning */
@@ -1591,8 +1591,8 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host)
                         * wider, give auto tuning enough space to handle the sample
                         * point shift cause by temperature change.
                         */
-                        tmp &= ~ESDHC_TUNING_WINDOW_MASK;
-                        tmp |= FIELD_PREP(ESDHC_TUNING_WINDOW_MASK, ESDHC_AUTO_TUNING_WINDOW);
+                       tmp &= ~ESDHC_TUNING_WINDOW_MASK;
+                       tmp |= FIELD_PREP(ESDHC_TUNING_WINDOW_MASK, ESDHC_AUTO_TUNING_WINDOW);
 
                        /* Disable the CMD CRC check for tuning, if not, need to
                         * add some delay after every tuning command, because
 
---

base-commit: 484803582c77061b470ac64a634f25f89715be3f
change-id: 20250516-b4-usdhc-bcd8cea08ed6

Best regards,
--
Haibo Chen <[email protected]>