From: Andi Kleen <andi@firstfloor.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>,
x86@kernel.org
Subject: Re: [PATCH] x86: fix apic.h unused but set warnings v2
Date: Mon, 08 Nov 2010 22:57:30 +0100 [thread overview]
Message-ID: <87oc9zqy0l.fsf@basil.nowhere.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1011082238420.2900@localhost6.localdomain6> (Thomas Gleixner's message of "Mon, 8 Nov 2010 22:39:49 +0100 (CET)")
Thomas Gleixner <tglx@linutronix.de> writes:
> On Mon, 8 Nov 2010, Andi Kleen wrote:
>> static inline u32 native_apic_msr_read(u32 reg)
>> {
>> - u32 low, high;
>> + u32 low;
>>
>> if (reg == APIC_DFR)
>> return -1;
>>
>> - rdmsr(APIC_BASE_MSR + (reg >> 4), low, high);
>> - return low;
>> + rdmsrl(APIC_BASE_MSR + (reg >> 4), low);
>> + return (u32)low;
>
> What's the point of casting u32 to u32 ?
One of the earlier reviewers thought adding an explicit cast would make
the truncation in the code clearer. I didn't full agree either, but
still did the change.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2010-11-08 21:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 21:20 [PATCH] x86: fix apic.h unused but set warnings v2 Andi Kleen
2010-11-08 21:39 ` Thomas Gleixner
2010-11-08 21:57 ` Andi Kleen [this message]
2010-11-08 22:15 ` Cyrill Gorcunov
2010-11-09 1:50 ` Andi Kleen
2010-11-09 20:22 ` Cyrill Gorcunov
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=87oc9zqy0l.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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