[U-Boot] [PATCH v2 4/5] usb: host: replace printf() by error() in ehci-generic

Simon Glass sjg at chromium.org
Mon May 15 03:27:50 UTC 2017


On 12 May 2017 at 14:51, Marek Vasut <marex at denx.de> wrote:
> On 05/12/2017 07:27 PM, patrice.chotard at st.com wrote:
>> From: Patrice Chotard <patrice.chotard at st.com>
>
> Commit message does not explain WHY this change is needed. In fact ...
> commit message is missing altogether ...

Yes it really helps to have a commit message!

>
>> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>
>> ---
>>
>> v2:   _ create this independant path for printf() replacement

Reviewed-by: Simon Glass <sjg at chromium.org>

>>
>>  drivers/usb/host/ehci-generic.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
>> index 0000808..39b56de 100644
>> --- a/drivers/usb/host/ehci-generic.c
>> +++ b/drivers/usb/host/ehci-generic.c
>> @@ -74,7 +74,7 @@ static int ehci_usb_probe(struct udevice *dev)
>>               if (ret < 0)
>>                       break;
>>               if (clk_enable(&clk)) {
>> -                     printf("failed to enable clock %d\n", i);
>> +                     error("failed to enable clock %d\n", i);
>>                       clk_free(&clk);
>>                       goto clk_err;
>>               }
>> @@ -88,7 +88,7 @@ static int ehci_usb_probe(struct udevice *dev)
>>               if (ret < 0)
>>                       break;
>>               if (reset_deassert(&reset)) {
>> -                     printf("failed to deassert reset %d\n", i);
>> +                     error("failed to deassert reset %d\n", i);
>>                       reset_free(&reset);
>>                       goto reset_err;
>>               }
>>
>
>
> --
> Best regards,
> Marek Vasut


More information about the U-Boot mailing list