]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86/dmi: fix dmi_alloc() section mismatches
authorJeremy Fitzhardinge <jeremy@goop.org>
Sun, 22 Mar 2009 21:48:44 +0000 (14:48 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 23 Mar 2009 16:20:50 +0000 (17:20 +0100)
Impact: section mismatch fix

Ingo reports these warnings:
> WARNING: vmlinux.o(.text+0x6a288e): Section mismatch in reference from
> the function dmi_alloc() to the function .init.text:extend_brk()
> The function dmi_alloc() references
> the function __init extend_brk().
> This is often because dmi_alloc lacks a __init annotation or the
> annotation of extend_brk is wrong.

dmi_alloc() is a static inline, and so should be immune to this
kind of error.  But force it to be inlined and make it __init
anyway, just to be extra sure.

All of dmi_alloc()'s callers are already __init.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49C6B23C.2040308@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/dmi.h

index aa32f7e6c197485c709670f00cbfe66ae873b65b..fd8f9e2ca35f16ffdac6b9e609be0086ae055803 100644 (file)
@@ -1,10 +1,13 @@
 #ifndef _ASM_X86_DMI_H
 #define _ASM_X86_DMI_H
 
+#include <linux/compiler.h>
+#include <linux/init.h>
+
 #include <asm/io.h>
 #include <asm/setup.h>
 
-static inline void *dmi_alloc(unsigned len)
+static __always_inline __init void *dmi_alloc(unsigned len)
 {
        return extend_brk(len, sizeof(int));
 }