提交 2711b793 编写于 作者: V Vegard Nossum 提交者: Linus Torvalds

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: NVegard Nossum <vegard.nossum@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 924d9add
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define _LINUX_KALLSYMS_H #define _LINUX_KALLSYMS_H
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#define KSYM_NAME_LEN 128 #define KSYM_NAME_LEN 128
...@@ -105,18 +106,10 @@ static inline void print_fn_descriptor_symbol(const char *fmt, void *addr) ...@@ -105,18 +106,10 @@ static inline void print_fn_descriptor_symbol(const char *fmt, void *addr)
print_symbol(fmt, (unsigned long)addr); print_symbol(fmt, (unsigned long)addr);
} }
#ifndef CONFIG_64BIT static inline void print_ip_sym(unsigned long ip)
#define print_ip_sym(ip) \ {
do { \ printk("[<%p>]", (void *) ip);
printk("[<%08lx>]", ip); \ print_symbol(" %s\n", 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
#endif /*_LINUX_KALLSYMS_H*/ #endif /*_LINUX_KALLSYMS_H*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册