]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mmc: core: style fixes in mmc.c
authorBhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
Mon, 1 Sep 2025 13:44:10 +0000 (19:14 +0530)
committerPeng Fan <peng.fan@nxp.com>
Wed, 24 Sep 2025 16:06:27 +0000 (00:06 +0800)
Fix a couple of style issues reported by checkpatch.pl:

- Replace `#ifdef CONFIG_MMC_TRACE` with `#if IS_ENABLED(CONFIG_MMC_TRACE)`
  to follow the preferred kernel style for config-dependent branches.
- Drop explicit zero initialization of a static variable.

No functional change intended.

Signed-off-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/mmc/mmc.c

index 20afcffde3db0b01764e6bbc7ce7a81cbdcb03cd..b1cfa3cd7c22fac07fa16fac1cdb9500d2470a50 100644 (file)
@@ -104,8 +104,7 @@ __weak int board_mmc_getcd(struct mmc *mmc)
        return -1;
 }
 #endif
-
-#ifdef CONFIG_MMC_TRACE
+#if IS_ENABLED(CONFIG_MMC_TRACE)
 void mmmc_trace_before_send(struct mmc *mmc, struct mmc_cmd *cmd)
 {
        printf("CMD_SEND:%d\n", cmd->cmdidx);
@@ -3190,7 +3189,7 @@ static int mmc_probe(struct bd_info *bis)
 
 int mmc_initialize(struct bd_info *bis)
 {
-       static int initialized = 0;
+       static int initialized;
        int ret;
        if (initialized)        /* Avoid initializing mmc multiple times */
                return 0;