public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi is_memory_available ia64 hack build fix
@ 2006-12-08 10:33 Paul Jackson
  2006-12-08 10:53 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Jackson @ 2006-12-08 10:33 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel
  Cc: davej, Myaskouvskey, Artiom, Randy Dunlap, shai.satt, Andi Kleen,
	hpa, Paul Jackson

From: Paul Jackson <pj@sgi.com>

The addition of an is_available_memory() routine to some arch i386
code, along with an extern for it in efi.h, caused the ia64 build
to fail, which has the apparently identical routine, marked 'static'.

The ia64 build fails with:

arch/ia64/kernel/efi.c:229: error: static declaration of 'is_available_memory' follows non-static declaration
include/linux/efi.h:305: error: previous declaration of 'is_available_memory' was here              

Removing the static modifier from the ia64 definition of this
routine lets it build.

But it still doesn't seem right - as now we have two apparently
identical copies of is_available_memory() defined, in:

  arch/i386/kernel/efi.c
  arch/ia64/kernel/efi.c

However, I don't know what to do about that.
At least the build gets past this point now.

Signed-off-by: Paul Jackson <pj@sgi.com>

---

 arch/ia64/kernel/efi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 2.6.19-rc6-mm2.orig/arch/ia64/kernel/efi.c	2006-12-08 02:05:57.190745630 -0800
+++ 2.6.19-rc6-mm2/arch/ia64/kernel/efi.c	2006-12-08 02:07:38.256082124 -0800
@@ -224,7 +224,7 @@ efi_gettimeofday (struct timespec *ts)
 	ts->tv_nsec = tm.nanosecond;
 }
 
-static int
+int
 is_available_memory (efi_memory_desc_t *md)
 {
 	if (!(md->attribute & EFI_MEMORY_WB))

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

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

* Re: [PATCH] efi is_memory_available ia64 hack build fix
  2006-12-08 10:33 [PATCH] efi is_memory_available ia64 hack build fix Paul Jackson
@ 2006-12-08 10:53 ` Andrew Morton
  2006-12-08 10:57   ` Paul Jackson
  2006-12-08 19:12   ` Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2006-12-08 10:53 UTC (permalink / raw)
  To: Paul Jackson
  Cc: linux-kernel, davej, Myaskouvskey, Artiom, Randy Dunlap,
	shai.satt, Andi Kleen, hpa

On Fri, 08 Dec 2006 02:33:36 -0800
Paul Jackson <pj@sgi.com> wrote:

> The addition of an is_available_memory() routine to some arch i386
> code, along with an extern for it in efi.h, caused the ia64 build
> to fail, which has the apparently identical routine, marked 'static'.
> 
> The ia64 build fails with:
> 
> arch/ia64/kernel/efi.c:229: error: static declaration of 'is_available_memory' follows non-static declaration
> include/linux/efi.h:305: error: previous declaration of 'is_available_memory' was here              

That already got named to is_memory_available()

(Which I suspect is the wrong fix, because the function serves the same
purpose on ia64 as it does on x86[_64], but nobody listens to me)

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

* Re: [PATCH] efi is_memory_available ia64 hack build fix
  2006-12-08 10:53 ` Andrew Morton
@ 2006-12-08 10:57   ` Paul Jackson
  2006-12-08 19:12   ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Jackson @ 2006-12-08 10:57 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, davej, artiom.myaskouvskey, randy.dunlap, shai.satt,
	ak, hpa

Andrew wrote:
> That already got named to is_memory_available()

Ok - oh well.  Whatever.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

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

* Re: [PATCH] efi is_memory_available ia64 hack build fix
  2006-12-08 10:53 ` Andrew Morton
  2006-12-08 10:57   ` Paul Jackson
@ 2006-12-08 19:12   ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2006-12-08 19:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Paul Jackson, linux-kernel, davej, Myaskouvskey, Artiom,
	shai.satt, Andi Kleen, hpa

On Fri, 8 Dec 2006 02:53:12 -0800 Andrew Morton wrote:

> On Fri, 08 Dec 2006 02:33:36 -0800
> Paul Jackson <pj@sgi.com> wrote:
> 
> > The addition of an is_available_memory() routine to some arch i386
> > code, along with an extern for it in efi.h, caused the ia64 build
> > to fail, which has the apparently identical routine, marked 'static'.
> > 
> > The ia64 build fails with:
> > 
> > arch/ia64/kernel/efi.c:229: error: static declaration of 'is_available_memory' follows non-static declaration
> > include/linux/efi.h:305: error: previous declaration of 'is_available_memory' was here              
> 
> That already got named to is_memory_available()
> 
> (Which I suspect is the wrong fix, because the function serves the same
> purpose on ia64 as it does on x86[_64], but nobody listens to me)

Paul's patch looks better to me than renaming one of them.
And the predicate name on ia64 now seems confusing, at least to me.

And EFI for x86_64 is being worked on, so it will either
use arch/i386/kernel/efi.c or duplicate lots of it.

Summary:  There needs to be a place to share this and possibly other
common functions.

---
~Randy

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

end of thread, other threads:[~2006-12-08 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 10:33 [PATCH] efi is_memory_available ia64 hack build fix Paul Jackson
2006-12-08 10:53 ` Andrew Morton
2006-12-08 10:57   ` Paul Jackson
2006-12-08 19:12   ` Randy Dunlap

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