public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asm-ppc/elf.h warning
@ 2004-03-26 17:33 Meelis Roos
  2004-03-26 17:43 ` Tom Rini
  0 siblings, 1 reply; 5+ messages in thread
From: Meelis Roos @ 2004-03-26 17:33 UTC (permalink / raw)
  To: Linux Kernel list

Just got this from current 2.6 BK:

  CC      arch/ppc/boot/simple/misc.o
In file included from include/linux/elf.h:5,
                 from arch/ppc/boot/simple/misc.c:20:
include/asm/elf.h:102: warning: `struct task_struct' declared inside parameter list
include/asm/elf.h:102: warning: its scope is only this definition or declaration, which is probably not what you want

This can be cured by either including linux/sched.h or defining
struct task_struct;
(like this - maybe it should be more close to the headers)

===== include/asm-ppc/elf.h 1.10 vs edited =====
--- 1.10/include/asm-ppc/elf.h	Wed Mar 24 04:49:17 2004
+++ edited/include/asm-ppc/elf.h	Fri Mar 26 18:40:42 2004
@@ -99,6 +99,7 @@
 	((t)->thread.regs?					\
 	 ({ ELF_CORE_COPY_REGS((elfregs), (t)->thread.regs); 1; }): 0)

+struct task_struct;
 extern int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpu);
 #define ELF_CORE_COPY_FPREGS(t, fpu)	dump_task_fpu((t), (fpu))


-- 
Meelis Roos (mroos@linux.ee)




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

* Re: [PATCH] asm-ppc/elf.h warning
  2004-03-26 17:33 [PATCH] asm-ppc/elf.h warning Meelis Roos
@ 2004-03-26 17:43 ` Tom Rini
  2004-03-26 18:00   ` Meelis Roos
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2004-03-26 17:43 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Fri, Mar 26, 2004 at 07:33:55PM +0200, Meelis Roos wrote:

> Just got this from current 2.6 BK:
> 
>   CC      arch/ppc/boot/simple/misc.o
> In file included from include/linux/elf.h:5,
>                  from arch/ppc/boot/simple/misc.c:20:
> include/asm/elf.h:102: warning: `struct task_struct' declared inside parameter list
> include/asm/elf.h:102: warning: its scope is only this definition or declaration, which is probably not what you want
> 
> This can be cured by either including linux/sched.h or defining
> struct task_struct;
> (like this - maybe it should be more close to the headers)

Can you try just removing <linux/elf.h> from everything in
arch/ppc/boot/ ?

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] asm-ppc/elf.h warning
  2004-03-26 17:43 ` Tom Rini
@ 2004-03-26 18:00   ` Meelis Roos
  2004-03-26 18:19     ` Tom Rini
  2004-03-26 21:40     ` Greg Weeks
  0 siblings, 2 replies; 5+ messages in thread
From: Meelis Roos @ 2004-03-26 18:00 UTC (permalink / raw)
  To: Tom Rini; +Cc: Linux Kernel list

> Can you try just removing <linux/elf.h> from everything in
> arch/ppc/boot/ ?

elf.h include is present in arch/ppc/boot/simple/misc.c and
arch/ppc/boot/simple/misc-embedded.c. The first one caused my warning
and the include can be safely removed from there. The other file is not
used in my config (prep) but I did try to compile it with elf.h include
removed (make arch/ppc/boot/simple/misc-embedded.o) and it failed. So
here is the patch against arch/ppc/boot/simple/misc.c. Nevertheless,
asm-ppc/elf.h can not be included by itself without a warning about
struct task_struct - is this a problem or not?

===== arch/ppc/boot/simple/misc.c 1.18 vs edited =====
--- 1.18/arch/ppc/boot/simple/misc.c	Tue Mar  2 01:34:28 2004
+++ edited/arch/ppc/boot/simple/misc.c	Fri Mar 26 19:51:24 2004
@@ -17,7 +17,6 @@
  */

 #include <linux/types.h>
-#include <linux/elf.h>
 #include <linux/config.h>
 #include <linux/string.h>

-- 
Meelis Roos (mroos@linux.ee)


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

* Re: [PATCH] asm-ppc/elf.h warning
  2004-03-26 18:00   ` Meelis Roos
@ 2004-03-26 18:19     ` Tom Rini
  2004-03-26 21:40     ` Greg Weeks
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2004-03-26 18:19 UTC (permalink / raw)
  To: Meelis Roos; +Cc: Linux Kernel list

On Fri, Mar 26, 2004 at 08:00:06PM +0200, Meelis Roos wrote:

> > Can you try just removing <linux/elf.h> from everything in
> > arch/ppc/boot/ ?
> 
> elf.h include is present in arch/ppc/boot/simple/misc.c and
> arch/ppc/boot/simple/misc-embedded.c. The first one caused my warning
> and the include can be safely removed from there. The other file is not
> used in my config (prep) but I did try to compile it with elf.h include
> removed (make arch/ppc/boot/simple/misc-embedded.o) and it failed. So
> here is the patch against arch/ppc/boot/simple/misc.c.

Ok, I'll look into that myself.

> Nevertheless,
> asm-ppc/elf.h can not be included by itself without a warning about
> struct task_struct - is this a problem or not?

It depends on if (a) other arches have a task_struct-needing extern in
this file and (b) what do they do?  There's at least a few #includes
with implicit #include requirements out there, i _think_.

-- 
Tom Rini
http://gate.crashing.org/~trini/

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

* Re: [PATCH] asm-ppc/elf.h warning
  2004-03-26 18:00   ` Meelis Roos
  2004-03-26 18:19     ` Tom Rini
@ 2004-03-26 21:40     ` Greg Weeks
  1 sibling, 0 replies; 5+ messages in thread
From: Greg Weeks @ 2004-03-26 21:40 UTC (permalink / raw)
  To: Meelis Roos; +Cc: linux-kernel

Meelis Roos wrote:

>>Can you try just removing <linux/elf.h> from everything in
>>arch/ppc/boot/ ?
>>    
>>
>
>elf.h include is present in arch/ppc/boot/simple/misc.c and
>arch/ppc/boot/simple/misc-embedded.c. The first one caused my warning
>and the include can be safely removed from there. The other file is not
>used in my config (prep) but I did try to compile it with elf.h include
>removed (make arch/ppc/boot/simple/misc-embedded.o) and it failed. So
>here is the patch against arch/ppc/boot/simple/misc.c. Nevertheless,
>asm-ppc/elf.h can not be included by itself without a warning about
>struct task_struct - is this a problem or not?
>  
>
I checked and I simply removed it when building for an ep8260. What 
board still needs it?

Greg Weeks

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

end of thread, other threads:[~2004-03-26 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-26 17:33 [PATCH] asm-ppc/elf.h warning Meelis Roos
2004-03-26 17:43 ` Tom Rini
2004-03-26 18:00   ` Meelis Roos
2004-03-26 18:19     ` Tom Rini
2004-03-26 21:40     ` Greg Weeks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox