[PATCH] mmc: display an error number to debug
Stephen Warren
swarren at wwwdotorg.org
Mon Nov 16 16:39:26 CET 2020
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:
static int mmc_power_on(struct mmc *mmc)
{
#if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR)
More information about the U-Boot
mailing list