From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751851AbbLZNvW (ORCPT ); Sat, 26 Dec 2015 08:51:22 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:60855 "EHLO us-alimail-mta1.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750752AbbLZNvU (ORCPT ); Sat, 26 Dec 2015 08:51:20 -0500 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.1145389|-1;FP=0|0|0|0|0|-1|-1|-1;HT=e01l04446;MF=chengang@emindsoft.com.cn;NM=1;PH=DS;RN=7;RT=6;SR=0;TI=SMTPD_----4OVKjND_1451137819; From: chengang@emindsoft.com.cn To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Chen Gang Subject: [PATCH] arch/x86/kernel/ptrace.c: Remove redundant arg_offs_table Date: Sat, 26 Dec 2015 21:49:58 +0800 Message-Id: <1451137798-28701-1-git-send-email-chengang@emindsoft.com.cn> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chen Gang The related warning from gcc 6.0: arch/x86/kernel/ptrace.c:127:18: warning: ‘arg_offs_table’ defined but not used [-Wunused-const-variable] static const int arg_offs_table[] = { ^~~~~~~~~~~~~~ Signed-off-by: Chen Gang --- arch/x86/kernel/ptrace.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 558f50e..32e9d9c 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -124,21 +124,6 @@ const char *regs_query_register_name(unsigned int offset) return NULL; } -static const int arg_offs_table[] = { -#ifdef CONFIG_X86_32 - [0] = offsetof(struct pt_regs, ax), - [1] = offsetof(struct pt_regs, dx), - [2] = offsetof(struct pt_regs, cx) -#else /* CONFIG_X86_64 */ - [0] = offsetof(struct pt_regs, di), - [1] = offsetof(struct pt_regs, si), - [2] = offsetof(struct pt_regs, dx), - [3] = offsetof(struct pt_regs, cx), - [4] = offsetof(struct pt_regs, r8), - [5] = offsetof(struct pt_regs, r9) -#endif -}; - /* * does not yet catch signals sent when the child dies. * in exit.c or in signal.c. -- 1.9.3