From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 4 Oct 2012 15:39:41 +0200 Subject: [U-Boot] [PATCH] arm1136: cosmetic: Remove double test on CONFIG_SYS_DCACHE_OFF In-Reply-To: <616950058.2399354.1344950229125.JavaMail.root@advansee.com> References: <616950058.2399354.1344950229125.JavaMail.root@advansee.com> Message-ID: <20121004153941.1da7c8f5@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Beno?t, On Tue, 14 Aug 2012 15:17:09 +0200 (CEST), Beno?t Th?baudeau wrote: > Remove a redundant '#ifndef CONFIG_SYS_DCACHE_OFF' nested in the same #ifndef. > > Signed-off-by: Beno?t Th?baudeau > Cc: Albert Aribaud > --- > .../arch/arm/cpu/arm1136/cpu.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/cpu.c u-boot-4d3c95f/arch/arm/cpu/arm1136/cpu.c > index b98e3d9..1136c1d 100644 > --- u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/cpu.c > +++ u-boot-4d3c95f/arch/arm/cpu/arm1136/cpu.c > @@ -146,9 +146,7 @@ void enable_caches(void) > #ifndef CONFIG_SYS_ICACHE_OFF > icache_enable(); > #endif > -#ifndef CONFIG_SYS_DCACHE_OFF > dcache_enable(); > -#endif > } > > #else /* #ifndef CONFIG_SYS_DCACHE_OFF */ I'll NAK this one because: 1) obviously the big #ifndef CONFIG_SYS_DCACHE_OFF / #else /#endif is there to provide either working D$ functions or empty ones; 2) enable_caches() exists only in the "then" branch, not at all in the "else" branch, which makes it a surprising exception; 3) enable_caches() is the only function in the if/then/else acting on I$ as well as D$; ... so I suspect it did not actually belong in the big if/then/else in the first place and should not be modified but moved after the #endif. Please provide a V2 patch, I promise it'll get processed faster than this V1. Amicalement, -- Albert.