[PATCH 2/5] xen: remove unused function warnings

From: Steven Rostedt
Date: Thu Oct 02 2008 - 11:12:20 EST


The compiler is complaining that there are unused static functions
in the Xen code. Looking into this, it seems that they are used
but only within #if statements.

This patch matches the functions with the #if statements that they
are referenced by.

CC: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
CC: Chris Wright <chrisw@xxxxxxxxxxxx>
Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
---
arch/x86/xen/enlighten.c | 4 ++++
1 file changed, 4 insertions(+)

Index: linux-compile.git/arch/x86/xen/enlighten.c
===================================================================
--- linux-compile.git.orig/arch/x86/xen/enlighten.c 2008-10-02 10:34:13.000000000 -0400
+++ linux-compile.git/arch/x86/xen/enlighten.c 2008-10-02 10:57:52.000000000 -0400
@@ -704,10 +704,12 @@ static unsigned long xen_read_cr2(void)
return x86_read_percpu(xen_vcpu)->arch.cr2;
}

+#ifdef CONFIG_X86_32
static unsigned long xen_read_cr2_direct(void)
{
return x86_read_percpu(xen_vcpu_info.arch.cr2);
}
+#endif

static void xen_write_cr4(unsigned long cr4)
{
@@ -962,6 +964,7 @@ static void *xen_kmap_atomic_pte(struct
}
#endif

+#ifndef CONFIG_X86_64
static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
{
/* If there's an existing pte, then don't allow _PAGE_RW to be set */
@@ -980,6 +983,7 @@ static __init void xen_set_pte_init(pte_

xen_set_pte(ptep, pte);
}
+#endif

static __init void xen_pagetable_setup_start(pgd_t *base)
{

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/