lkml.org 
[lkml]   [2009]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: compile time warnings
On Fri, 2 Jan 2009, Tom Spink wrote:

> 2009/1/1 Jesper Juhl <jj@chaosbits.net>:
> > On Thu, 1 Jan 2009, Ingo Brueckl wrote:
> [snip]
>
> Hi,
>
> > pgd_base is very much used...
>
> It's probably something to do with:
>
> # define permanent_kmaps_init(pgd_base) do { } while (0)
>
> Which is within the #else part of #if CONFIG_HIGHMEM. So, if
> CONFIG_HIGHMEM is not set, permanent_kmaps_init gets wiped out, and
> therefore that warning will be issued.
>
> Perhaps changing that to an empty inline would remove the warning?
>
Yeah, I noticed that as well after sending the mail.
Another way to silence the warning (which I think is nicer) would be
something like this;


Silence 'unused variable' warning in arch/x86/mm/init_32.c::pagetable_init

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---

diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 8655b5b..0affa8e 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -511,9 +511,7 @@ static void __init early_ioremap_page_table_range_init(pgd_t *pgd_base)

static void __init pagetable_init(void)
{
- pgd_t *pgd_base = swapper_pg_dir;
-
- permanent_kmaps_init(pgd_base);
+ permanent_kmaps_init((pgd_t *)swapper_pg_dir);
}

#ifdef CONFIG_ACPI_SLEEP

--
Jesper Juhl <jj@chaosbits.net>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html



\
 
 \ /
  Last update: 2009-01-02 03:11    [W:0.079 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site