[U-Boot] [PATCH] common: Fix logic in fpga programming

Wolfgang Denk wd at denx.de
Wed Dec 21 00:19:59 CET 2016


Dear Michal,

In message <0e8b363f-f84f-cea2-7784-8cc10e1e751b at xilinx.com> you wrote:
>
> > Good old U-Boot style says we print a message when we start an
> > operation, and then an OK / failed when done.  When the system crashes
> > in this command, you can see at last where it crashed, i. e. what the
> > last running command was.
> 
> Based on this style the first part of this message should be called at
> the beginning of this function not in this possition.

True,,,

> 255         if (ret) {
> 256                 printf("FPGA image is corrupted or invalid\n");
> 257                 return 1;
> 258         }
> 
> There is already printf for error.

Hm... Sorry, I did not follow all brachnes thrugh the code this i snot
exactly obvious from the patch.

> > This is even worse, as even though the system keeps running the user
> > has no indication of what failed...
> 
> Isn't it message above enough?

In the patch, I see only a "return 1;".

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Contrary to popular belief, thinking does not cause brain damage.


More information about the U-Boot mailing list