[U-Boot] [PATCH] board/purple/flash.c: removed unneded test

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Sat Jul 31 20:28:22 CEST 2010


2010/7/31 Wolfgang Denk <wd at denx.de>

> Dear Frans Meulenbroeks,
>
> In message <1280585375-1613-1-git-send-email-fransmeulenbroeks at gmail.com>
> you wrote:
> > removed part of a test which tested for a var that did not change
> > within the loop and hence was superfluous
>
> Hm... if you check the code, you see that the other "references" to
> this variable are not exactly making much sense either. And the
> function does not return any useful error codes.
>
> Looks as if this never was really thought to an end...
>
> If you touch this file, we should throw out rcode completely.
>

I can do that, no problem.
Actually I noticed that the rest of the code didn't make much sense but at
least it does not add to the footprint or execution time.
(thinking of it, maybe the code I removed was optimised away anyway).

And as I was unware whether the coding style demanded a return variable.
That is why I left it untouched.

Frans.

PS: I have no particular binding with this code. I don't happen to have this
hardware.
Just saw an optimisation/cleanup opportunity and decided to fix it.


More information about the U-Boot mailing list