All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm1136: cosmetic: Remove double test on CONFIG_SYS_DCACHE_OFF
Date: Thu, 4 Oct 2012 15:39:41 +0200	[thread overview]
Message-ID: <20121004153941.1da7c8f5@lilith> (raw)
In-Reply-To: <616950058.2399354.1344950229125.JavaMail.root@advansee.com>

Hi Beno?t,

On Tue, 14 Aug 2012 15:17:09 +0200 (CEST), Beno?t Th?baudeau
<benoit.thebaudeau@advansee.com> wrote:

> Remove a redundant '#ifndef CONFIG_SYS_DCACHE_OFF' nested in the same #ifndef.
> 
> Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
> ---
>  .../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.

  reply	other threads:[~2012-10-04 13:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 13:17 [U-Boot] [PATCH] arm1136: cosmetic: Remove double test on CONFIG_SYS_DCACHE_OFF Benoît Thébaudeau
2012-10-04 13:39 ` Albert ARIBAUD [this message]
2012-10-04 16:57   ` Benoît Thébaudeau
2012-10-05 17:05     ` Albert ARIBAUD
2012-10-05 17:36       ` Benoît Thébaudeau
2012-10-05 18:15         ` Albert ARIBAUD
2012-10-04 20:04 ` [U-Boot] [PATCH v2] arm1136: Fix enable_caches() Benoît Thébaudeau
2012-10-05 18:23   ` Albert ARIBAUD
2012-10-31 14:41     ` Benoît Thébaudeau
2012-11-10 11:29       ` Albert ARIBAUD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121004153941.1da7c8f5@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.