mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
perf dwarf: Guard !x86_64 definitions under #ifdef else clause
To fix the build on Fedora Rawhide (gcc 6.0.0 20160311 (Red Hat 6.0.0-0.17):
CC /tmp/build/perf/arch/x86/util/dwarf-regs.o
arch/x86/util/dwarf-regs.c:66:36: error: 'x86_32_regoffset_table' defined but not used [-Werror=unused-const-variable=]
static const struct pt_regs_offset x86_32_regoffset_table[] = {
^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
22a9f41b55
commit
62aa0e177d
1 changed files with 4 additions and 4 deletions
|
|
@ -63,6 +63,8 @@ struct pt_regs_offset {
|
|||
# define REG_OFFSET_NAME_32(n, r) {.name = n, .offset = offsetof(struct pt_regs, r)}
|
||||
#endif
|
||||
|
||||
/* TODO: switching by dwarf address size */
|
||||
#ifndef __x86_64__
|
||||
static const struct pt_regs_offset x86_32_regoffset_table[] = {
|
||||
REG_OFFSET_NAME_32("%ax", eax),
|
||||
REG_OFFSET_NAME_32("%cx", ecx),
|
||||
|
|
@ -75,6 +77,8 @@ static const struct pt_regs_offset x86_32_regoffset_table[] = {
|
|||
REG_OFFSET_END,
|
||||
};
|
||||
|
||||
#define regoffset_table x86_32_regoffset_table
|
||||
#else
|
||||
static const struct pt_regs_offset x86_64_regoffset_table[] = {
|
||||
REG_OFFSET_NAME_64("%ax", rax),
|
||||
REG_OFFSET_NAME_64("%dx", rdx),
|
||||
|
|
@ -95,11 +99,7 @@ static const struct pt_regs_offset x86_64_regoffset_table[] = {
|
|||
REG_OFFSET_END,
|
||||
};
|
||||
|
||||
/* TODO: switching by dwarf address size */
|
||||
#ifdef __x86_64__
|
||||
#define regoffset_table x86_64_regoffset_table
|
||||
#else
|
||||
#define regoffset_table x86_32_regoffset_table
|
||||
#endif
|
||||
|
||||
/* Minus 1 for the ending REG_OFFSET_END */
|
||||
|
|
|
|||
Loading…
Reference in a new issue