Re: [PATCH 1/4] include/linux/printk.h is not self-contained

From: Randy Dunlap
Date: Wed May 25 2011 - 13:10:01 EST


On 05/25/11 02:09, y@xxxxxxxxxxxx wrote:
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
>
> <linux/printk.h> needs to include
> - <stdarg.h> for "va_list",
> - <linux/linkage.h> for "asmlinkage",
> - <linux/types.h> for "bool".
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
> include/linux/printk.h | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/printk.h b/include/linux/printk.h
> index ee048e7..6388bc8 100644
> --- a/include/linux/printk.h
> +++ b/include/linux/printk.h
> @@ -1,6 +1,10 @@
> #ifndef __KERNEL_PRINTK__
> #define __KERNEL_PRINTK__
>
> +#include <stdarg.h>
> +#include <linux/linkage.h>
> +#include <linux/types.h>
> +
> extern const char linux_banner[];
> extern const char linux_proc_banner[];
>

I agree with this patch along with Joe's 2 header additions...
but I get build errors with it (as reported yesterday):


CC arch/x86/kernel/asm-offsets.s
In file included from linux-next-20110524/include/linux/thread_info.h:53,
from linux-next-20110524/include/linux/preempt.h:9,
from linux-next-20110524/include/linux/spinlock.h:50,
from linux-next-20110524/include/linux/ratelimit.h:5,
from linux-next-20110524/include/linux/printk.h:8,
from linux-next-20110524/include/linux/kernel.h:20,
from linux-next-20110524/arch/x86/include/asm/percpu.h:44,
from linux-next-20110524/arch/x86/include/asm/current.h:5,
from linux-next-20110524/arch/x86/include/asm/processor.h:15,
from linux-next-20110524/arch/x86/include/asm/atomic.h:6,
from linux-next-20110524/include/linux/crypto.h:20,
from linux-next-20110524/arch/x86/kernel/asm-offsets.c:8:
linux-next-20110524/arch/x86/include/asm/thread_info.h:34: error: expected specifier-qualifier-list before 'mm_segment_t'
In file included from linux-next-20110524/include/linux/ratelimit.h:5,
from linux-next-20110524/include/linux/printk.h:8,
from linux-next-20110524/include/linux/kernel.h:20,
from linux-next-20110524/arch/x86/include/asm/percpu.h:44,
from linux-next-20110524/arch/x86/include/asm/current.h:5,
from linux-next-20110524/arch/x86/include/asm/processor.h:15,
from linux-next-20110524/arch/x86/include/asm/atomic.h:6,
from linux-next-20110524/include/linux/crypto.h:20,
from linux-next-20110524/arch/x86/kernel/asm-offsets.c:8:
linux-next-20110524/include/linux/spinlock.h: In function 'spin_unlock_wait':
linux-next-20110524/include/linux/spinlock.h:360: error: implicit declaration of function 'cpu_relax'
In file included from linux-next-20110524/arch/x86/include/asm/atomic.h:6,
from linux-next-20110524/include/linux/crypto.h:20,
from linux-next-20110524/arch/x86/kernel/asm-offsets.c:8:
linux-next-20110524/arch/x86/include/asm/processor.h: At top level:
linux-next-20110524/arch/x86/include/asm/processor.h:707: warning: conflicting types for 'cpu_relax'
linux-next-20110524/arch/x86/include/asm/processor.h:707: error: static declaration of 'cpu_relax' follows non-static declaration
linux-next-20110524/include/linux/spinlock.h:360: note: previous implicit declaration of 'cpu_relax' was here
In file included from linux-next-20110524/arch/x86/include/asm/i387.h:17,
from linux-next-20110524/arch/x86/include/asm/suspend_32.h:10,
from linux-next-20110524/arch/x86/include/asm/suspend.h:2,
from linux-next-20110524/arch/x86/kernel/asm-offsets.c:18:
linux-next-20110524/include/linux/regset.h: In function 'copy_regset_to_user':
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:338: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h: In function 'copy_regset_from_user':
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
linux-next-20110524/include/linux/regset.h:361: error: 'struct thread_info' has no member named 'addr_limit'
In file included from linux-next-20110524/arch/x86/kernel/asm-offsets.c:25:
linux-next-20110524/arch/x86/kernel/asm-offsets_32.c: In function 'foo':
linux-next-20110524/arch/x86/kernel/asm-offsets_32.c:32: error: 'struct thread_info' has no member named 'sysenter_return'
linux-next-20110524/arch/x86/kernel/asm-offsets.c: In function 'common':
linux-next-20110524/arch/x86/kernel/asm-offsets.c:34: error: 'struct thread_info' has no member named 'addr_limit'

--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
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/