[PATCH v2 1/1] usb: informative message if no controller

Marek Vasut marex at denx.de
Tue Jun 18 13:49:53 CEST 2024


On 6/18/24 11:44 AM, Dragan Simic wrote:
> Hello Heinrich,
> 
> Please see a nitpick below.
> 
> On 2024-06-18 10:16, Heinrich Schuchardt wrote:
>> The message 'No working controllers found' provides no clue that this
>> refers to USB controllers.
>>
>> Provide a message that refers to USB.
>>
>> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
>> ---
>> v2:
>>     add 'found' at end of message
>>     keep printf
>> ---
>>  drivers/usb/host/usb-uclass.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/host/usb-uclass.c 
>> b/drivers/usb/host/usb-uclass.c
>> index a1cd0ad2d66..bd861270af3 100644
>> --- a/drivers/usb/host/usb-uclass.c
>> +++ b/drivers/usb/host/usb-uclass.c
>> @@ -388,7 +388,7 @@ int usb_init(void)
>>
>>      /* if we were not able to find at least one working bus, bail out */
>>      if (controllers_initialized == 0)
>> -        printf("No working controllers found\n");
>> +        printf("No USB controller found\n");
> 
> The plural form, "controllers", should be used instead, because it sounds
> more natural.  I wrote it that way in my earlier response. [1]

The singular controller does make sense in this context, but in the user 
facing print that goes on console, the plural controllers is easier to 
understand. So, yes, please do a V3 with 'controllers'.


More information about the U-Boot mailing list