From: roel <12o3l@tiscali.nl>
To: Dave Jones <davej@redhat.com>, roel <12o3l@tiscali.nl>,
travis@sgi.com, Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>, Christoph Lameter <clameter@sgi.com>,
Jack Steiner <steiner@sgi.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86: Convert cpuinfo_x86 array to a per_cpu array v3
Date: Tue, 25 Sep 2007 02:20:01 +0200 [thread overview]
Message-ID: <46F85431.1020306@tiscali.nl> (raw)
In-Reply-To: <20070924232423.GJ8127@redhat.com>
Dave Jones wrote:
> <excessive quoting trimmed, please don't quote 40K of text
> to add a single line reply>
Ok, sorry, I don't know these rules
> On Tue, Sep 25, 2007 at 12:01:56AM +0200, roel wrote:
>
> > > --- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
> > > +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
> > > @@ -215,7 +215,7 @@ static struct cpufreq_driver powernow_k6
> > > */
> > > static int __init powernow_k6_init(void)
> > > {
> > > - struct cpuinfo_x86 *c = cpu_data;
> > > + struct cpuinfo_x86 *c = &cpu_data(0);
> > >
> > > if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) ||
> > > ((c->x86_model != 12) && (c->x86_model != 13)))
> >
> > while we're at it, we could change this to
> >
> > if (!(c->x86_vendor == X86_VENDOR_AMD && c->x86 == 5 &&
> > (c->x86_model == 12 || c->x86_model == 13)))
>
> For what purpose? There's nothing wrong with the code as it stands,
> and inverting the tests means we'd have to move a bunch of
> code inside the if arm instead of just returning -ENODEV.
It's not inverting the test, so you don't need to move code. It evaluates
the same, only the combined negation is moved to the front. I suggested it
to increase clarity, it results in the same assembly language.
Roel
next prev parent reply other threads:[~2007-09-25 0:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 21:08 [PATCH 0/1] x86: Convert cpuinfo_x86 array to a per_cpu array v3 travis
2007-09-24 21:08 ` [PATCH 1/1] " travis
2007-09-24 22:01 ` roel
2007-09-24 23:24 ` Dave Jones
2007-09-25 0:20 ` roel [this message]
2007-09-25 0:31 ` Dave Jones
2007-10-16 8:18 ` [PATCH 0/1] " Andrew Morton
2007-08-04 1:15 ` Mike Travis
2007-10-16 15:02 ` Christoph Lameter
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=46F85431.1020306@tiscali.nl \
--to=12o3l@tiscali.nl \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=steiner@sgi.com \
--cc=travis@sgi.com \
/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