From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Tue, 17 Nov 2020 06:38:05 +0900 Subject: [PATCH] mmc: display an error number to debug In-Reply-To: <61681f53-427b-fcff-c4b1-084a073816fd@wwwdotorg.org> References: <20201106112304.25783-1-jh80.chung@samsung.com> <61681f53-427b-fcff-c4b1-084a073816fd@wwwdotorg.org> Message-ID: <2dbc4700-259f-ba66-ae21-8ae05ff1c47e@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Stephen, On 11/17/20 12:39 AM, Stephen Warren wrote: > On 11/6/20 4:23 AM, Jaehoon Chung wrote: >> It's useful to know an error number when it's debugging. > >> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > >> @@ -2746,7 +2746,7 @@ static int mmc_power_on(struct mmc *mmc) >> int ret = regulator_set_enable(mmc->vmmc_supply, true); >> >> if (ret) { >> - puts("Error enabling VMMC supply\n"); >> + puts("Error enabling VMMC supply : %d\n", ret); > > At least this one needs to be printf() not puts(). This causes build > failures for any board that compiles this code, i.e. anything with the > following enabled: Thanks for pointing out! Will fix. Best Regards, Jaehoon Chung > > static int mmc_power_on(struct mmc *mmc) > { > #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR) >