[U-Boot] [PATCH 2/6] Separate flash read and write operations

Wolfgang Denk wd at denx.de
Sun Aug 31 20:57:35 CEST 2008


Dear Guennadi Liakhovetski,

In message <Pine.LNX.4.64.0808311757460.3747 at axis700.grange> you wrote:
> 
> So, no, this is not because I didn't like somebody else's coding style. 
> This is because with NAND addition this function would become an 
> absolutely unreadable monster. So, I would consider this patch a 
> readability improvement.

But you are duplicating code. It may be just 20 lines or so, but  the
better  approach  would  be to leave the common code as is and factor
out two new functions being called from the common code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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
My brother sent me a postcard the other day with this  big  sattelite
photo  of the entire earth on it. On the back it said: "Wish you were
here".                                                - Steven Wright


More information about the U-Boot mailing list