All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include: crash_dump.h: Add elf.h header
@ 2012-01-04 12:04 Fabio Estevam
  2012-01-04 20:28 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2012-01-04 12:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, linux, Fabio Estevam, Fabio Estevam

Building an ARM target we get the following warnings:

CC      arch/arm/kernel/setup.o
In file included from arch/arm/kernel/setup.c:39:
arch/arm/include/asm/elf.h:102:1: warning: "vmcore_elf64_check_arch" redefined
In file included from arch/arm/kernel/setup.c:24:
include/linux/crash_dump.h:30:1: warning: this is the location of the previous definition

Quoting Russell King:

"linux/crash_dump.h makes no attempt to include asm/elf.h, but it depends
on stuff in asm/elf.h to determine how stuff inside this file is defined
at parse time.

So, if asm/elf.h is included after linux/crash_dump.h or not at all, you
get a different result from the situation where asm/elf.h is included
before."

So add elf.h header to crash_dump.h to avoid this problem.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
The original discussion about this can be found at:
http://www.spinics.net/lists/arm-kernel/msg154113.html

 include/linux/crash_dump.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index 5c4abce..b936763 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -5,6 +5,7 @@
 #include <linux/kexec.h>
 #include <linux/device.h>
 #include <linux/proc_fs.h>
+#include <linux/elf.h>
 
 #define ELFCORE_ADDR_MAX	(-1ULL)
 #define ELFCORE_ADDR_ERR	(-2ULL)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] include: crash_dump.h: Add elf.h header
  2012-01-04 12:04 [PATCH] include: crash_dump.h: Add elf.h header Fabio Estevam
@ 2012-01-04 20:28 ` Andrew Morton
  2012-01-04 21:56   ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2012-01-04 20:28 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-kernel, linux, Fabio Estevam, Russell King

On Wed,  4 Jan 2012 10:04:26 -0200
Fabio Estevam <festevam@gmail.com> wrote:

> Building an ARM target we get the following warnings:
> 
> CC      arch/arm/kernel/setup.o
> In file included from arch/arm/kernel/setup.c:39:
> arch/arm/include/asm/elf.h:102:1: warning: "vmcore_elf64_check_arch" redefined
> In file included from arch/arm/kernel/setup.c:24:
> include/linux/crash_dump.h:30:1: warning: this is the location of the previous definition
> 
> Quoting Russell King:
> 
> "linux/crash_dump.h makes no attempt to include asm/elf.h, but it depends
> on stuff in asm/elf.h to determine how stuff inside this file is defined
> at parse time.
> 
> So, if asm/elf.h is included after linux/crash_dump.h or not at all, you
> get a different result from the situation where asm/elf.h is included
> before."
> 
> So add elf.h header to crash_dump.h to avoid this problem.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> The original discussion about this can be found at:
> http://www.spinics.net/lists/arm-kernel/msg154113.html
> 
>  include/linux/crash_dump.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
> index 5c4abce..b936763 100644
> --- a/include/linux/crash_dump.h
> +++ b/include/linux/crash_dump.h
> @@ -5,6 +5,7 @@
>  #include <linux/kexec.h>
>  #include <linux/device.h>
>  #include <linux/proc_fs.h>
> +#include <linux/elf.h>
>  
>  #define ELFCORE_ADDR_MAX	(-1ULL)
>  #define ELFCORE_ADDR_ERR	(-2ULL)

The patch is the right thing to do, however I'm rather concerned about
the potential for introducing build breakage so late in 3.2.

Can we leave this unfixed in 3.2 and fix it in 3.2.1?  Or put a
#include elf.h into arch/arm/kernel/setup.c for 3.2?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] include: crash_dump.h: Add elf.h header
  2012-01-04 20:28 ` Andrew Morton
@ 2012-01-04 21:56   ` Russell King - ARM Linux
  0 siblings, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2012-01-04 21:56 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Fabio Estevam, linux-kernel, Fabio Estevam

On Wed, Jan 04, 2012 at 12:28:05PM -0800, Andrew Morton wrote:
> The patch is the right thing to do, however I'm rather concerned about
> the potential for introducing build breakage so late in 3.2.
> 
> Can we leave this unfixed in 3.2 and fix it in 3.2.1?  Or put a
> #include elf.h into arch/arm/kernel/setup.c for 3.2?

arch/arm/kernel/setup.c doesn't need either of these includes.  The
reason I didn't want to just remove the include and magic the error
away is because of the obvious fragility of the current situation,
which really needs solving.

As this is the only report of this breakage, I'm inclined to go
with your first suggestion: leave it unfixed in 3.2 and fix it in
-stable once it's been in visible for a bit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-04 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-04 12:04 [PATCH] include: crash_dump.h: Add elf.h header Fabio Estevam
2012-01-04 20:28 ` Andrew Morton
2012-01-04 21:56   ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.