Re: [U-Boot] [RFC PATCH v3 2/2] disk: part: Remove redundant error message

2018-07-20 Thread Sam Protsenko
On Fri, Jul 20, 2018 at 1:53 AM, Tom Rini  wrote:
> On Fri, Jul 20, 2018 at 01:28:43AM +0300, Sam Protsenko wrote:
>
>> Underlying API should already print some meaningful error message, so
>> this one is just brings more noise. E.g. we can see log like this:
>>
>> MMC: no card present
>> ** Bad device mmc 0 **
>>
>> Obviously, second error message is unwanted. Let's remove it to make log
>> more short and clear.
>>
>> Signed-off-by: Sam Protsenko 
>> ---
>>  disk/part.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/disk/part.c b/disk/part.c
>> index 9266a09ec3..0762a0750f 100644
>> --- a/disk/part.c
>> +++ b/disk/part.c
>> @@ -400,7 +400,6 @@ int blk_get_device_by_str(const char *ifname, const char 
>> *dev_hwpart_str,
>>
>>   *dev_desc = get_dev_hwpart(ifname, dev, hwpart);
>>   if (!(*dev_desc) || ((*dev_desc)->type == DEV_TYPE_UNKNOWN)) {
>> - printf("** Bad device %s %s **\n", ifname, dev_hwpart_str);
>>   dev = -ENOENT;
>>   goto cleanup;
>>   }
>
> We should move this to debug() I think.
>

Yes, better to use debug() than remove it completely, thanks. So, if
there is no further objections, I'm gonna set real patch series soon.

> --
> Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH v3 2/2] disk: part: Remove redundant error message

2018-07-19 Thread Tom Rini
On Fri, Jul 20, 2018 at 01:28:43AM +0300, Sam Protsenko wrote:

> Underlying API should already print some meaningful error message, so
> this one is just brings more noise. E.g. we can see log like this:
> 
> MMC: no card present
> ** Bad device mmc 0 **
> 
> Obviously, second error message is unwanted. Let's remove it to make log
> more short and clear.
> 
> Signed-off-by: Sam Protsenko 
> ---
>  disk/part.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/disk/part.c b/disk/part.c
> index 9266a09ec3..0762a0750f 100644
> --- a/disk/part.c
> +++ b/disk/part.c
> @@ -400,7 +400,6 @@ int blk_get_device_by_str(const char *ifname, const char 
> *dev_hwpart_str,
>  
>   *dev_desc = get_dev_hwpart(ifname, dev, hwpart);
>   if (!(*dev_desc) || ((*dev_desc)->type == DEV_TYPE_UNKNOWN)) {
> - printf("** Bad device %s %s **\n", ifname, dev_hwpart_str);
>   dev = -ENOENT;
>   goto cleanup;
>   }

We should move this to debug() I think.

-- 
Tom


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [RFC PATCH v3 2/2] disk: part: Remove redundant error message

2018-07-19 Thread Sam Protsenko
Underlying API should already print some meaningful error message, so
this one is just brings more noise. E.g. we can see log like this:

MMC: no card present
** Bad device mmc 0 **

Obviously, second error message is unwanted. Let's remove it to make log
more short and clear.

Signed-off-by: Sam Protsenko 
---
 disk/part.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/disk/part.c b/disk/part.c
index 9266a09ec3..0762a0750f 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -400,7 +400,6 @@ int blk_get_device_by_str(const char *ifname, const char 
*dev_hwpart_str,
 
*dev_desc = get_dev_hwpart(ifname, dev, hwpart);
if (!(*dev_desc) || ((*dev_desc)->type == DEV_TYPE_UNKNOWN)) {
-   printf("** Bad device %s %s **\n", ifname, dev_hwpart_str);
dev = -ENOENT;
goto cleanup;
}
-- 
2.18.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot