From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759575AbcDMHWX (ORCPT ); Wed, 13 Apr 2016 03:22:23 -0400 Received: from terminus.zytor.com ([198.137.202.10]:50830 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759557AbcDMHWU (ORCPT ); Wed, 13 Apr 2016 03:22:20 -0400 Date: Wed, 13 Apr 2016 00:22:05 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: hpa@zytor.com, tglx@linutronix.de, namhyung@kernel.org, jolsa@kernel.org, dsahern@gmail.com, acme@redhat.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, wangnan0@huawei.com Reply-To: tglx@linutronix.de, hpa@zytor.com, wangnan0@huawei.com, mingo@kernel.org, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, acme@redhat.com, dsahern@gmail.com, jolsa@kernel.org, namhyung@kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf dwarf: Guard !x86_64 definitions under #ifdef else clause Git-Commit-ID: f9383452a26fc47f62c4ddcfa20ccebb7a09c2d8 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f9383452a26fc47f62c4ddcfa20ccebb7a09c2d8 Gitweb: http://git.kernel.org/tip/f9383452a26fc47f62c4ddcfa20ccebb7a09c2d8 Author: Arnaldo Carvalho de Melo AuthorDate: Fri, 8 Apr 2016 12:04:29 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 8 Apr 2016 12:04:29 -0300 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 Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-fghuksc1u8ln82bof4lwcj0o@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/x86/util/dwarf-regs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c index 9223c16..1f86ee8 100644 --- a/tools/perf/arch/x86/util/dwarf-regs.c +++ b/tools/perf/arch/x86/util/dwarf-regs.c @@ -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 */