[U-Boot] [PATCH] mmc: replace the printf() instead of error()

Masahiro Yamada yamada.masahiro at socionext.com
Tue Oct 24 02:38:17 UTC 2017


Hi Jaehoon

2017-10-23 13:49 GMT+09:00 Jaehoon Chung <jh80.chung at samsung.com>:
> On 10/23/2017 01:46 PM, Jaehoon Chung wrote:
>> Replace the printf() instead of error().
>> It is occurred the compiler error with "undefined reference to 'error'".
>>
>> Fixes: e0079fecd75b ("mmc: refacstor SD startup to make it easier to support new modes")
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung at samsung.com>
>
> Applied to u-boot-mmc.
>
> Best Regards,
> Jaehoon Chung
>
>> ---
>>  drivers/mmc/mmc.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>> index 55a53c2200..a5a521eec3 100644
>> --- a/drivers/mmc/mmc.c
>> +++ b/drivers/mmc/mmc.c
>> @@ -828,7 +828,7 @@ static int mmc_get_capabilities(struct mmc *mmc)
>>               return 0;
>>
>>       if (!ext_csd) {
>> -             error("No ext_csd found!\n"); /* this should enver happen */
>> +             printf("No ext_csd found!\n"); /* this should enver happen */
>>               return -ENOTSUPP;
>>       }
>>
>> @@ -1433,7 +1433,7 @@ static inline int bus_width(uint cap)
>>               return 4;
>>       if (cap == MMC_MODE_1BIT)
>>               return 1;
>> -     error("invalid bus witdh capability 0x%x\n", cap);
>> +     printf("invalid bus witdh capability 0x%x\n", cap);
>>       return 0;
>>  }
>>
>> @@ -1638,7 +1638,7 @@ error:
>>               }
>>       }
>>
>> -     error("unable to select a mode\n");
>> +     printf("unable to select a mode\n");
>>       return -ENOTSUPP;
>>  }
>>
>> @@ -1844,7 +1844,7 @@ error:
>>               }
>>       }
>>
>> -     error("unable to select a mode\n");
>> +     printf("unable to select a mode\n");
>>
>>       return -ENOTSUPP;
>>  }
>>
>


No.  Please use pr_err().


Why don't you squash this to e0079fecd75b?

This loses bisect'ability.




-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list