From: Andrew Morton Date: Wed, 2 Apr 2008 20:04:52 +0000 (-0700) Subject: alpha: get_current(): don't add zero to current_thread_info()->task X-Git-Tag: firefly_0821_release~21755 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=06f11f37aa84e83b48cdf36037c4414f5a83c13f;p=firefly-linux-kernel-4.4.55.git alpha: get_current(): don't add zero to current_thread_info()->task A nasty compile error: In file included from security/keys/internal.h:16, from security/keys/sysctl.c:14: include/linux/key-ui.h: In function 'key_permission': include/linux/key-ui.h:51: error: invalid use of undefined type 'struct task_struct' apparently the compiler has decided that it needs to know sizeof(task_struct) so that it can add zero to a task_struct* (which is rather dumb of it). Getting task_struct in scope in these deeply-nested headers is scary-looking, so let's just remove the "+ 0". Cc: David Howells Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/asm-alpha/current.h b/include/asm-alpha/current.h index 8d88a13c1bec..094d285a1b34 100644 --- a/include/asm-alpha/current.h +++ b/include/asm-alpha/current.h @@ -3,7 +3,7 @@ #include -#define get_current() (current_thread_info()->task + 0) +#define get_current() (current_thread_info()->task) #define current get_current() #endif /* _ALPHA_CURRENT_H */