summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBhimeswararao Matsa <[email protected]>2025-09-01 19:14:10 +0530
committerPeng Fan <[email protected]>2025-09-25 00:06:27 +0800
commit3cabc6bf7e16c7e2a1156392c31e40f678cc7026 (patch)
treebae2dcda485512295b535608f22f0250ae191ebe
parent6c98e6014b3a36933860d02cb757565ec2fc80a4 (diff)
mmc: core: style fixes in mmc.c
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 <[email protected]> Signed-off-by: Peng Fan <[email protected]>
-rw-r--r--drivers/mmc/mmc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 20afcffde3d..b1cfa3cd7c2 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -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;