Commit f83ca9fe3ee390755f18b4a7780c25ce593b484a

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent 6d9eac3410

[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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -127,7 +127,7 @@
127 127 #ifndef CONFIG_MODVERSIONS
128 128 #define symversion(base, idx) NULL
129 129 #else
130   -#define symversion(base, idx) ((base) ? ((base) + (idx)) : NULL)
  130 +#define symversion(base, idx) ((base != NULL) ? ((base) + (idx)) : NULL)
131 131 #endif
132 132  
133 133 /* lookup symbol in given range of kernel_symbols */