public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
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
Date: Mon, 8 Nov 2010 00:20:45 +0300	[thread overview]
Message-ID: <20101107212045.GC13175@lenovo> (raw)
In-Reply-To: <1289159606-17417-1-git-send-email-andi@firstfloor.org>

On Sun, Nov 07, 2010 at 08:53:26PM +0100, Andi Kleen wrote:
... 
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 286de34..9c4e06b 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -141,12 +141,12 @@ static inline void native_apic_msr_write(u32 reg, u32 v)
>  
>  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);
> +	rdmsrl(APIC_BASE_MSR + (reg >> 4), low);
>  	return low;
>  }

 At least the former code _didn't_ hide the details of which
part of 'long long' value we need. Would not

 u64 val;
 rdmsrl(APIC_BASE_MSR + (reg >> 4), val);
 return (u32)val;

be more clear?

 Cyrill

  reply	other threads:[~2010-11-07 21:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-07 19:53 [PATCH] x86: fix apic.h unused but set warnings Andi Kleen
2010-11-07 21:20 ` Cyrill Gorcunov [this message]
2010-11-08  0:38   ` Andi Kleen
2010-11-08 19:36 ` Thomas Gleixner
2010-11-08 21:06   ` Andi Kleen
2010-11-08 23:29     ` Thomas Gleixner
2010-11-09 15:11       ` Public apology Andi Kleen
2010-11-09 20:54         ` Thomas Gleixner
2010-11-10 13:44           ` Andi Kleen
2010-11-08 20:21 ` [PATCH] x86: fix apic.h unused but set warnings Thomas Gleixner

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=20101107212045.GC13175@lenovo \
    --to=gorcunov@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --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