From: Andrew Morton Date: Tue, 28 Mar 2006 09:56:20 +0000 (-0800) Subject: [PATCH] symversion warning fix X-Git-Tag: v2.6.17-rc1~251 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f83ca9fe3ee390755f18b4a7780c25ce593b484a;p=linux-2.6-omap-h63xx.git [PATCH] symversion warning fix gcc-4.2: kernel/module.c: In function '__find_symbol': kernel/module.c:158: warning: the address of '__start___kcrctab', will always evaluate as 'true' kernel/module.c:165: warning: the address of '__start___kcrctab_gpl', will always evaluate as 'true' kernel/module.c:182: warning: the address of '__start___kcrctab_gpl_future', will always evaluate as 'true' Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/module.c b/kernel/module.c index 4fafd58038a..bd088a7c149 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -127,7 +127,7 @@ extern const unsigned long __start___kcrctab_gpl_future[]; #ifndef CONFIG_MODVERSIONS #define symversion(base, idx) NULL #else -#define symversion(base, idx) ((base) ? ((base) + (idx)) : NULL) +#define symversion(base, idx) ((base != NULL) ? ((base) + (idx)) : NULL) #endif /* lookup symbol in given range of kernel_symbols */