diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-07-19 14:52:59 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-07-20 10:46:23 +0200 |
commit | 11d8b05855f3749bcb6c57e2c4052921b9605c77 (patch) | |
tree | a5ba8c1c35e66126957c50b0be06e0362c1fdd37 /lib/seq_buf.c | |
parent | x86/defconfig: Remove stale, old Kconfig options (diff) | |
download | linux-11d8b05855f3749bcb6c57e2c4052921b9605c77.tar.xz linux-11d8b05855f3749bcb6c57e2c4052921b9605c77.zip |
perf/x86: Shut up false-positive -Wmaybe-uninitialized warning
The intialization function checks for various failure scenarios, but
unfortunately the compiler gets a little confused about the possible
combinations, leading to a false-positive build warning when
-Wmaybe-uninitialized is set:
arch/x86/events/core.c: In function ‘init_hw_perf_events’:
arch/x86/events/core.c:264:3: warning: ‘reg_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized]
arch/x86/events/core.c:264:3: warning: ‘val_fail’ may be used uninitialized in this function [-Wmaybe-uninitialized]
pr_err(FW_BUG "the BIOS has corrupted hw-PMU resources (MSR %x is %Lx)\n",
We can't actually run into this case, so this shuts up the warning
by initializing the variables to a known-invalid state.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170719125310.2487451-2-arnd@arndb.de
Link: https://patchwork.kernel.org/patch/9392595/
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/seq_buf.c')
0 files changed, 0 insertions, 0 deletions