projects/linux·commit e912bf2c

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

e912bf2c · Linus Torvalds <[email protected]> · 2018-02-25 16:57:22 -08:00

Pull perf fix from Thomas Gleixner:
 "A single commit which shuts up a bogus GCC-8 warning"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()
Commit
e912bf2cf7cd893915adf388fc2b79f5d9bdfd44
Parents
9c897096 · 85c615eb

Merge commit. Changes below are compared with the first parent: 9c897096.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
arch/x86/oprofile/nmi_int.cmodified+1−1View file

arch/x86/oprofile/nmi_int.c

View file
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index 174c597..a7a7677 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -460,7 +460,7 @@ static int nmi_setup(void)
goto fail;
for_each_possible_cpu(cpu) {
- if (!cpu)
+ if (!IS_ENABLED(CONFIG_SMP) || !cpu)
continue;
memcpy(per_cpu(cpu_msrs, cpu).counters,