From: Antonio SJ Musumeci <bile@landofbile.com>
To: linux-mips@linux-mips.org
Subject: Re: patch: include/asm-mips/system.h __cmpxchg64 bugfix and cleanup
Date: Wed, 18 Oct 2006 15:45:50 -0400 [thread overview]
Message-ID: <20061018154550.5ac7a0fb@amiga> (raw)
In-Reply-To: <20061018184159.GC4051@networkno.de>
It's not a good style... you shouldn't be relying on optimization to
protect you from bad coding practices. It goes against the
style of the other macros defined by the config and leads to bugs like
this:
Signed-off-by: Antonio SJ Musumeci <bile@landofbile.com>
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index cc895da..4084dc3 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -842,7 +842,7 @@ static void __init probe_pcache(void)
c->dcache.ways = 4;
c->dcache.waybit = __ffs(dcache_size / c->dcache.ways);
-#if !defined(CONFIG_SMP) || !defined(RM9000_CDEX_SMP_WAR)
+#if !defined(CONFIG_SMP) || !RM9000_CDEX_SMP_WAR
c->options |= MIPS_CPU_CACHE_CDEX_P;
#endif
c->options |= MIPS_CPU_PREFETCH;
On Wed, 18 Oct 2006 19:41:59 +0100
Thiemo Seufer <ths@networkno.de> wrote:
> Antonio SJ Musumeci wrote:
> > I'm not talking about that. This patch explains it. Moving
> > the conditional compilation from the optimizer to the preprocessor.
> > I see no reason to be using hard coded 1's and 0's in runtime logic.
>
> It is easier to read than a ifdef maze, and the net result is the
> same.
>
>
> Thiemo
>
>
prev parent reply other threads:[~2006-10-18 19:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 18:03 patch: include/asm-mips/system.h __cmpxchg64 bugfix and cleanup bile
2006-10-13 10:42 ` Ralf Baechle
2006-10-13 13:53 ` Antonio SJ Musumeci
2006-10-13 14:11 ` Ralf Baechle
2006-10-13 19:18 ` Antonio SJ Musumeci
2006-10-15 18:42 ` Ralf Baechle
2006-10-18 18:08 ` Antonio SJ Musumeci
2006-10-18 18:41 ` Thiemo Seufer
2006-10-18 19:45 ` Antonio SJ Musumeci [this message]
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=20061018154550.5ac7a0fb@amiga \
--to=bile@landofbile.com \
--cc=linux-mips@linux-mips.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox