All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
@ 2016-05-19 23:45 Marek Vasut
  2016-05-20  0:11 ` Fabio Estevam
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Marek Vasut @ 2016-05-19 23:45 UTC (permalink / raw)
  To: u-boot

The spl_parse_image_header() can return 0 and it is not an error.
Only treat non-zero return value as an error.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@konsulko.com>
---
 common/spl/spl_fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
index 338ea2f..5b0d969 100644
--- a/common/spl/spl_fat.c
+++ b/common/spl/spl_fat.c
@@ -58,7 +58,7 @@ int spl_load_image_fat(struct blk_desc *block_dev,
 		goto end;
 
 	err = spl_parse_image_header(header);
-	if (err <= 0)
+	if (err)
 		goto end;
 
 	err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
@ 2016-05-20  0:11 ` Fabio Estevam
  2016-05-20  9:31 ` Peng Fan
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2016-05-20  0:11 UTC (permalink / raw)
  To: u-boot

On Thu, May 19, 2016 at 8:45 PM, Marek Vasut <marex@denx.de> wrote:
> The spl_parse_image_header() can return 0 and it is not an error.
> Only treat non-zero return value as an error.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
  2016-05-20  0:11 ` Fabio Estevam
@ 2016-05-20  9:31 ` Peng Fan
  2016-05-20  9:36 ` Stefano Babic
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Peng Fan @ 2016-05-20  9:31 UTC (permalink / raw)
  To: u-boot

On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:
>The spl_parse_image_header() can return 0 and it is not an error.
>Only treat non-zero return value as an error.
>
>Signed-off-by: Marek Vasut <marex@denx.de>
>Cc: Fabio Estevam <fabio.estevam@nxp.com>
>Cc: Peng Fan <van.freenix@gmail.com>
>Cc: Stefano Babic <sbabic@denx.de>
>Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Peng Fan <van.freenix@gmail.com>

Regards,
Peng.
>---
> common/spl/spl_fat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
>index 338ea2f..5b0d969 100644
>--- a/common/spl/spl_fat.c
>+++ b/common/spl/spl_fat.c
>@@ -58,7 +58,7 @@ int spl_load_image_fat(struct blk_desc *block_dev,
> 		goto end;
> 
> 	err = spl_parse_image_header(header);
>-	if (err <= 0)
>+	if (err)
> 		goto end;
> 
> 	err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
>-- 
>2.7.0
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
  2016-05-20  0:11 ` Fabio Estevam
  2016-05-20  9:31 ` Peng Fan
@ 2016-05-20  9:36 ` Stefano Babic
  2016-05-20 13:02 ` Tom Rini
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2016-05-20  9:36 UTC (permalink / raw)
  To: u-boot

On 20/05/2016 01:45, Marek Vasut wrote:
> The spl_parse_image_header() can return 0 and it is not an error.
> Only treat non-zero return value as an error.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  common/spl/spl_fat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c
> index 338ea2f..5b0d969 100644
> --- a/common/spl/spl_fat.c
> +++ b/common/spl/spl_fat.c
> @@ -58,7 +58,7 @@ int spl_load_image_fat(struct blk_desc *block_dev,
>  		goto end;
>  
>  	err = spl_parse_image_header(header);
> -	if (err <= 0)
> +	if (err)
>  		goto end;
>  
>  	err = file_fat_read(filename, (u8 *)spl_image.load_addr, 0);
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
                   ` (2 preceding siblings ...)
  2016-05-20  9:36 ` Stefano Babic
@ 2016-05-20 13:02 ` Tom Rini
  2016-05-23 12:14 ` [U-Boot] " Heiko Schocher
  2016-05-23 22:14 ` Tom Rini
  5 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2016-05-20 13:02 UTC (permalink / raw)
  To: u-boot

On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:

> The spl_parse_image_header() can return 0 and it is not an error.
> Only treat non-zero return value as an error.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160520/a2bfeb32/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
                   ` (3 preceding siblings ...)
  2016-05-20 13:02 ` Tom Rini
@ 2016-05-23 12:14 ` Heiko Schocher
  2016-05-23 22:14 ` Tom Rini
  5 siblings, 0 replies; 10+ messages in thread
From: Heiko Schocher @ 2016-05-23 12:14 UTC (permalink / raw)
  To: u-boot

Hello Marek,

Am 20.05.2016 um 01:45 schrieb Marek Vasut:
> The spl_parse_image_header() can return 0 and it is not an error.
> Only treat non-zero return value as an error.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
> Reviewed-by: Peng Fan <van.freenix@gmail.com>
> Reviewed-by: Stefano Babic <sbabic@denx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> ---
>   common/spl/spl_fat.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Thanks!

So:
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
                   ` (4 preceding siblings ...)
  2016-05-23 12:14 ` [U-Boot] " Heiko Schocher
@ 2016-05-23 22:14 ` Tom Rini
  2016-06-17 15:01   ` Fabio Estevam
  5 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2016-05-23 22:14 UTC (permalink / raw)
  To: u-boot

On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:

> The spl_parse_image_header() can return 0 and it is not an error.
> Only treat non-zero return value as an error.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> Cc: Peng Fan <van.freenix@gmail.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
> Reviewed-by: Peng Fan <van.freenix@gmail.com>
> Reviewed-by: Stefano Babic <sbabic@denx.de>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160523/13cf210b/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-05-23 22:14 ` Tom Rini
@ 2016-06-17 15:01   ` Fabio Estevam
  2016-06-17 15:06     ` Marek Vasut
  0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2016-06-17 15:01 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Mon, May 23, 2016 at 7:14 PM, Tom Rini <trini@konsulko.com> wrote:
> On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:
>
>> The spl_parse_image_header() can return 0 and it is not an error.
>> Only treat non-zero return value as an error.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>> Cc: Peng Fan <van.freenix@gmail.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Tom Rini <trini@konsulko.com>
>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>> Reviewed-by: Peng Fan <van.freenix@gmail.com>
>> Reviewed-by: Stefano Babic <sbabic@denx.de>
>> Reviewed-by: Tom Rini <trini@konsulko.com>
>
> Applied to u-boot/master, thanks!

Looks like something went wrong while applying this patch as Marek's
authorship got lost:

commit d550e82e4efebf5995809e38e8fb029b8fe6e861
Author: Tom Rini <trini@konsulko.com>
Date:   Mon May 23 11:51:13 2016 -0400

    SPL: fat: Fix spl_parse_image_header() return value handling

    The spl_parse_image_header() can return 0 and it is not an error.
    Only treat non-zero return value as an error.

    Signed-off-by: Marek Vasut <marex@denx.de>
    Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
    Reviewed-by: Peng Fan <van.freenix@gmail.com>
    Reviewed-by: Stefano Babic <sbabic@denx.de>
    Reviewed-by: Tom Rini <trini@konsulko.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-06-17 15:01   ` Fabio Estevam
@ 2016-06-17 15:06     ` Marek Vasut
  2016-06-19 13:52       ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Marek Vasut @ 2016-06-17 15:06 UTC (permalink / raw)
  To: u-boot

On 06/17/2016 05:01 PM, Fabio Estevam wrote:
> Hi Tom,
> 
> On Mon, May 23, 2016 at 7:14 PM, Tom Rini <trini@konsulko.com> wrote:
>> On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:
>>
>>> The spl_parse_image_header() can return 0 and it is not an error.
>>> Only treat non-zero return value as an error.
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
>>> Cc: Peng Fan <van.freenix@gmail.com>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> Cc: Tom Rini <trini@konsulko.com>
>>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>>> Reviewed-by: Peng Fan <van.freenix@gmail.com>
>>> Reviewed-by: Stefano Babic <sbabic@denx.de>
>>> Reviewed-by: Tom Rini <trini@konsulko.com>
>>
>> Applied to u-boot/master, thanks!
> 
> Looks like something went wrong while applying this patch as Marek's
> authorship got lost:

Ah, you're right, nice catch :)

Tom, I don't really care, bug is fixed, you can leave it as it is.

> commit d550e82e4efebf5995809e38e8fb029b8fe6e861
> Author: Tom Rini <trini@konsulko.com>
> Date:   Mon May 23 11:51:13 2016 -0400
> 
>     SPL: fat: Fix spl_parse_image_header() return value handling
> 
>     The spl_parse_image_header() can return 0 and it is not an error.
>     Only treat non-zero return value as an error.
> 
>     Signed-off-by: Marek Vasut <marex@denx.de>
>     Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
>     Reviewed-by: Peng Fan <van.freenix@gmail.com>
>     Reviewed-by: Stefano Babic <sbabic@denx.de>
>     Reviewed-by: Tom Rini <trini@konsulko.com>
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] SPL: fat: Fix spl_parse_image_header() return value handling
  2016-06-17 15:06     ` Marek Vasut
@ 2016-06-19 13:52       ` Tom Rini
  0 siblings, 0 replies; 10+ messages in thread
From: Tom Rini @ 2016-06-19 13:52 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 17, 2016 at 05:06:05PM +0200, Marek Vasut wrote:
> On 06/17/2016 05:01 PM, Fabio Estevam wrote:
> > Hi Tom,
> > 
> > On Mon, May 23, 2016 at 7:14 PM, Tom Rini <trini@konsulko.com> wrote:
> >> On Fri, May 20, 2016 at 01:45:24AM +0200, Marek Vasut wrote:
> >>
> >>> The spl_parse_image_header() can return 0 and it is not an error.
> >>> Only treat non-zero return value as an error.
> >>>
> >>> Signed-off-by: Marek Vasut <marex@denx.de>
> >>> Cc: Fabio Estevam <fabio.estevam@nxp.com>
> >>> Cc: Peng Fan <van.freenix@gmail.com>
> >>> Cc: Stefano Babic <sbabic@denx.de>
> >>> Cc: Tom Rini <trini@konsulko.com>
> >>> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
> >>> Reviewed-by: Peng Fan <van.freenix@gmail.com>
> >>> Reviewed-by: Stefano Babic <sbabic@denx.de>
> >>> Reviewed-by: Tom Rini <trini@konsulko.com>
> >>
> >> Applied to u-boot/master, thanks!
> > 
> > Looks like something went wrong while applying this patch as Marek's
> > authorship got lost:
> 
> Ah, you're right, nice catch :)
> 
> Tom, I don't really care, bug is fixed, you can leave it as it is.

Ug! Sorry about that, I really don't know how that happened either.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160619/90036fb3/attachment.sig>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-19 13:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 23:45 [U-Boot] [PATCH] SPL: fat: Fix spl_parse_image_header() return value handling Marek Vasut
2016-05-20  0:11 ` Fabio Estevam
2016-05-20  9:31 ` Peng Fan
2016-05-20  9:36 ` Stefano Babic
2016-05-20 13:02 ` Tom Rini
2016-05-23 12:14 ` [U-Boot] " Heiko Schocher
2016-05-23 22:14 ` Tom Rini
2016-06-17 15:01   ` Fabio Estevam
2016-06-17 15:06     ` Marek Vasut
2016-06-19 13:52       ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.