[PATCHv3 1/4] efi: Add a stub for efi_enter_virtual_mode on non-x86
This eliminates an ifdef in init/main.c. Signed-off-by: Josh Triplett --- include/linux/efi.h |4 init/main.c |2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/efi.h b/include/linux/efi.h index ec45ccd..52fbedf 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -495,7 +495,11 @@ extern void *efi_get_pal_addr (void); extern void efi_map_pal_code (void); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); extern void efi_gettimeofday (struct timespec *ts); +#ifdef CONFIG_X86 extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ +#else +static void efi_enter_virtual_mode(void) {} +#endif extern u64 efi_get_iobase (void); extern u32 efi_mem_type (unsigned long phys_addr); extern u64 efi_mem_attributes (unsigned long phys_addr); diff --git a/init/main.c b/init/main.c index b286730..ebb1ba5 100644 --- a/init/main.c +++ b/init/main.c @@ -602,10 +602,8 @@ asmlinkage void __init start_kernel(void) calibrate_delay(); pidmap_init(); anon_vma_init(); -#ifdef CONFIG_X86 if (efi_enabled) efi_enter_virtual_mode(); -#endif thread_info_cache_init(); cred_init(); fork_init(totalram_pages); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCHv3 1/4] efi: Add a stub for efi_enter_virtual_mode on non-x86
On Saturday 08 September 2012, Josh Triplett wrote: > +#ifdef CONFIG_X86 > extern void efi_enter_virtual_mode (void); /* switch EFI to virtual > mode, if possible */ > +#else > +static void efi_enter_virtual_mode(void) {} > +#endif This has suddenly appeared in linux-next now and is causing warnings. 8<--- efi: fix prototype for API stubs Some functions in the efi API have recently been added as versions for non-x86, but are missing an "inline" keyword, which causes these warnings: include/linux/efi.h:503:13: error: 'efi_enter_virtual_mode' defined but not used [-Werror=unused-function] include/linux/efi.h:504:13: error: 'efi_late_init' defined but not used [-Werror=unused-function] include/linux/efi.h:505:13: error: 'efi_free_boot_services' defined but not used [-Werror=unused-function] Signed-off-by: Arnd Bergmann diff --git a/include/linux/efi.h b/include/linux/efi.h index 798bd1d..58f31c3 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -500,9 +500,9 @@ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if pos extern void efi_late_init(void); extern void efi_free_boot_services(void); #else -static void efi_enter_virtual_mode(void) {} -static void efi_late_init(void) {} -static void efi_free_boot_services(void) {} +static inline void efi_enter_virtual_mode(void) {} +static inline void efi_late_init(void) {} +static inline void efi_free_boot_services(void) {} #endif extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr); extern u64 efi_get_iobase (void); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCHv3 1/4] efi: Add a stub for efi_enter_virtual_mode on non-x86
On Mon, Oct 01, 2012 at 08:28:32PM +, Arnd Bergmann wrote: > On Saturday 08 September 2012, Josh Triplett wrote: > > +#ifdef CONFIG_X86 > > extern void efi_enter_virtual_mode (void); /* switch EFI to virtual > > mode, if possible */ > > +#else > > +static void efi_enter_virtual_mode(void) {} > > +#endif > > This has suddenly appeared in linux-next now and is causing warnings. > > 8<--- > efi: fix prototype for API stubs > > Some functions in the efi API have recently been added as versions for > non-x86, > but are missing an "inline" keyword, which causes these warnings: > > include/linux/efi.h:503:13: error: 'efi_enter_virtual_mode' defined but not > used [-Werror=unused-function] > include/linux/efi.h:504:13: error: 'efi_late_init' defined but not used > [-Werror=unused-function] > include/linux/efi.h:505:13: error: 'efi_free_boot_services' defined but not > used [-Werror=unused-function] Already fixed in current tip; please refresh from there. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/