Patchwork linux-next: build warning in Linus' tree

login
register
mail settings
Submitter Arnaud Lacombe
Date Oct. 25, 2010, 3:47 a.m.
Message ID <1287978429-18542-1-git-send-email-lacombar@gmail.com>
Download mbox | patch
Permalink /patch/69062/
State Not Applicable
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Arnaud Lacombe - Oct. 25, 2010, 3:47 a.m.
Hi,

[adding linuxppc-dev@lists.ozlabs.org to the CC's list]

On Sun, Oct 24, 2010 at 10:52 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> In building Linus' tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> In file included from arch/powerpc/platforms/iseries/exception.S:32:
> arch/powerpc/include/asm/ptrace.h:60:1: warning: "STACK_FRAME_OVERHEAD" redefined
> In file included from arch/powerpc/include/asm/asm-offsets.h:1,
>                 from arch/powerpc/platforms/iseries/exception.S:30:
> include/generated/asm-offsets.h:87:1: warning: this is the location of the previous definition
>
> Caused by commit 3234282f33b29d349bcada40204fc7c8fda7fe72 ("x86, asm: Fix
> CFI macro invocations to deal with shortcomings in gas").

The following patch should fix this warning.

 - Arnaud

From: Arnaud Lacombe <lacombar@gmail.com>
Date: Sun, 24 Oct 2010 20:39:53 -0400
Subject: [PATCH] powerpc: wrap STACK_FRAME_OVERHEAD definition around parenthesis

Although the value does not need protection, wrapping it around parenthesis make
it match the definition from `include/generated/asm-offsets.h' and silent the
following gcc's warning:

In file included from arch/powerpc/kernel/head_32.S:34:0:
arch/powerpc/include/asm/ptrace.h:73:0: warning: "STACK_FRAME_OVERHEAD" redefined
include/generated/asm-offsets.h:28:0: note: this is the location of the previous definition

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>

---
 arch/powerpc/include/asm/ptrace.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 0175a67..3e18533 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -57,7 +57,7 @@  struct pt_regs {
 
 #ifdef __powerpc64__
 
-#define STACK_FRAME_OVERHEAD	112	/* size of minimum stack frame */
+#define STACK_FRAME_OVERHEAD	(112)	/* size of minimum stack frame */
 #define STACK_FRAME_LR_SAVE	2	/* Location of LR in stack frame */
 #define STACK_FRAME_REGS_MARKER	ASM_CONST(0x7265677368657265)
 #define STACK_INT_FRAME_SIZE	(sizeof(struct pt_regs) + \
@@ -70,7 +70,7 @@  struct pt_regs {
 
 #else /* __powerpc64__ */
 
-#define STACK_FRAME_OVERHEAD	16	/* size of minimum stack frame */
+#define STACK_FRAME_OVERHEAD	(16)	/* size of minimum stack frame */
 #define STACK_FRAME_LR_SAVE	1	/* Location of LR in stack frame */
 #define STACK_FRAME_REGS_MARKER	ASM_CONST(0x72656773)
 #define STACK_INT_FRAME_SIZE	(sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD)