• H. Peter Anvin's avatar
    x86, msr: Remove incorrect, duplicated code in the MSR driver · 494c2ebf
    H. Peter Anvin authored
    The MSR driver would compute the values for cpu and c at declaration,
    and then again in the body of the function.  This isn't merely
    redundant, but unsafe, since cpu might not refer to a valid CPU at
    that point.
    
    Remove the unnecessary and dangerous references in the declarations.
    This code now matches the equivalent code in the CPUID driver.
    Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
    494c2ebf
msr.c 6.33 KB