Skip to contentSkip to conversation

arch/x86/kernel/ptrace.c: Remove redundant arg_offs_table

PATCH New [email protected] 2 participants 2 messages Dec 26, 2015 – Dec 29, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/x86/kernel/ptrace.c: Remove redundant arg_offs_table

From: Chen Gang <[email protected]>

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[] = {
                    ^~~~~~~~~~~~~~
---
 arch/x86/kernel/ptrace.c | 15 ---------------
 1 file changed, 15 deletions(-)
arch/x86/kernel/ptrace.c +0 -15
index 558f50e..32e9d9c 100644
@@ -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.
Signature · 1 line
1.9.3
#1 lore raw

[tip:x86/cleanups] arch/x86/kernel/ptrace.c: Remove unused arg_offs_table

arch/x86/kernel/ptrace.c: Remove unused arg_offs_table
Commit-ID:  0105c8d8334fc941e0297ca6708fa57854114c0e
Gitweb:     http://git.kernel.org/tip/0105c8d8334fc941e0297ca6708fa57854114c0e
Author:     [email protected] <[email protected]>
AuthorDate: Sat, 26 Dec 2015 21:49:58 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Tue, 29 Dec 2015 11:35:34 +0100

arch/x86/kernel/ptrace.c: Remove unused arg_offs_table

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[] = {
                    ^~~~~~~~~~~~~~
---
 arch/x86/kernel/ptrace.c | 15 ---------------
 1 file changed, 15 deletions(-)
arch/x86/kernel/ptrace.c +0 -15
index 558f50e..32e9d9c 100644
@@ -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.