kallsyms: fix building without printk
authorArnd Bergmann <arnd@arndb.de>
Mon, 13 Nov 2017 16:50:59 +0000 (17:50 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 13 Nov 2017 17:48:56 +0000 (09:48 -0800)
commit01c313dded34a16ef69e3972ceca687ba8a7cdf2
treed7dce6243d33f0f90a07121dd02870073c66048e
parent37c6b6f22170f781fb24b11d61a864aa905e2c89
kallsyms: fix building without printk

Building kallsyms fails without CONFIG_PRINTK due to a missing
declaration:

  kernel/kallsyms.c: In function 'kallsyms_show_value':
  kernel/kallsyms.c:670:10: error: 'kptr_restrict' undeclared (first use in this function); did you mean 'keyring_restrict'?

This moves the declaration outside of the #ifdef guard, the definition
is already available without CONFIG_PRINTK.

Fixes: c0f3ea158939 ("stop using '%pK' for /proc/kallsyms pointer values")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ I clearly need to start doing "allnoconfig" builds too, or just have a
  test branch for the 0day robot - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/printk.h