mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
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 <[email protected]> Cc: Arjan van de Ven <[email protected]> Signed-off-by: Vegard Nossum <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
924d9addb9
commit
2711b793eb
1 file changed
+6
-13
@@ -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*/
|
||||
Reference in new issue
Block a user