Messages in this thread Patch in this message | | | Date | Thu, 02 Oct 2008 11:05:31 -0400 | From | Steven Rostedt <> | Subject | [PATCH 2/5] xen: remove unused function warnings |
| |
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@xensource.com> CC: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Steven Rostedt <srostedt@redhat.com> --- 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) { --
| |