aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/kallsyms.h
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2008-07-25 01:45:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-25 10:53:29 -0700
commit2711b793eb62a5873a0ba583a69252040aef176e (patch)
tree5e65f8347b7557f2ee10699b9a4cce0f490ba8b2 /include/linux/kallsyms.h
parentlist debugging: use WARN() instead of BUG() (diff)
downloadwireguard-linux-2711b793eb62a5873a0ba583a69252040aef176e.tar.xz
wireguard-linux-2711b793eb62a5873a0ba583a69252040aef176e.zip
kallsyms: unify 32- and 64-bit code
Use the %p format string which already accounts for the padding you need with a pointer type on a particular architecture. Also replace the macro with a static inline function to match the rest of the file. Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kallsyms.h')
-rw-r--r--include/linux/kallsyms.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index 00c1801099fa..57aefa160a92 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -6,6 +6,7 @@
#define _LINUX_KALLSYMS_H
#include <linux/errno.h>
+#include <linux/kernel.h>
#include <linux/stddef.h>
#define KSYM_NAME_LEN 128
@@ -105,18 +106,10 @@ static inline void print_fn_descriptor_symbol(const char *fmt, void *addr)
print_symbol(fmt, (unsigned long)addr);
}
-#ifndef CONFIG_64BIT
-#define print_ip_sym(ip) \
-do { \
- printk("[<%08lx>]", ip); \
- print_symbol(" %s\n", ip); \
-} while(0)
-#else
-#define print_ip_sym(ip) \
-do { \
- printk("[<%016lx>]", ip); \
- print_symbol(" %s\n", ip); \
-} while(0)
-#endif
+static inline void print_ip_sym(unsigned long ip)
+{
+ printk("[<%p>]", (void *) ip);
+ print_symbol(" %s\n", ip);
+}
#endif /*_LINUX_KALLSYMS_H*/