[U-Boot-Users] [PATCH] Fix missing dcache_enable symbol and declare cache function as weak

Wolfgang Denk wd at denx.de
Mon Apr 21 14:18:15 CEST 2008


In message <1208777868-11252-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> Recent commit a4986459 adds reference to dcache_enable set dcache and ecache
> function as __weak.
> 
> For cache status function it will return 0 if the function is not implemented
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>

I hereby reject this.

As discussed before (both here on the ML and on IRC), this is
completely the wrong move to take.

My concern is not silencing  compile  errors,  but  making  the  code
actually easy to read and to understand. And for this it is extremely
important that the code actually does what it claims to do. If I read
"icache_enable()"  I  want  to  be  able  to rely on the icache being
enabled, and not having to check zillions of other source  or  header
files  if there is just a dummy function that does nothing or a macro
definition that lies into my face either.

"But let your statement be, 'Yes, yes ' or 'No, no'; anything beyond
these is of evil." << Matthew 5:37 >>

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
A conservative is a man with two perfectly good legs  who  has  never
learned to walk.                              - Franklin D. Roosevelt




More information about the U-Boot mailing list