• Hidetoshi Seto's avatar
    x86, mce: trivial clean up for mce_amd_64.c · 34fa1967
    Hidetoshi Seto authored
    Fix for followings:
    
    WARNING: Use #include <linux/percpu.h> instead of <asm/percpu.h>
    +#include <asm/percpu.h>
    
    ERROR: Macros with multiple statements should be enclosed in a do - while
    loop
    +#define THRESHOLD_ATTR(_name, _mode, _show, _store)                    \
    +{                                                                      \
    +       .attr   = {.name = __stringify(_name), .mode = _mode },         \
    +       .show   = _show,                                                \
    +       .store  = _store,                                               \
    +};
    
    WARNING: usage of NR_CPUS is often wrong - consider using cpu_possible(),
    num_possible_cpus(), for_each_possible_cpu(), etc
    +       if (cpu >= NR_CPUS)
    Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
    Cc: Andi Kleen <andi@firstfloor.org>
    Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
    34fa1967
mce_amd_64.c 15.2 KB