From: Wolfgang Denk Date: Mon, 21 Apr 2008 14:18:15 +0200 Subject: [U-Boot-Users] [PATCH] Fix missing dcache_enable symbol and declare cache function as weak In-Reply-To: Your message of "Mon, 21 Apr 2008 13:37:48 +0200." <1208777868-11252-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <20080421121815.9614724764@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <1208777868-11252-1-git-send-email-plagnioj@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 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