lkml.org 
[lkml]   [2010]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] x86: fix apic.h unused but set warnings v2
    Date
    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.


    \
     
     \ /
      Last update: 2010-11-08 22:59    [W:4.709 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site