[PATCH] mmc: display an error number to debug

Jaehoon Chung jh80.chung at samsung.com
Mon Nov 16 22:38:05 CET 2020


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)
> 



More information about the U-Boot mailing list