From fa2dd543adea136b191291074f843d1f404c6eeb Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Fri, 16 May 2008 17:20:14 +0200 Subject: [PATCH] kallsyms: simplify print_ip_sym() No need to distinguish between 32- and 64-bit like that. Also make it a static inline function. Signed-off-by: Vegard Nossum --- include/linux/kallsyms.h | 18 +++++------------- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index 82de2fb..ffcd4e8 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -6,6 +6,7 @@ #define _LINUX_KALLSYMS_H #include +#include #include #define KSYM_NAME_LEN 128 @@ -101,18 +102,9 @@ static inline void print_symbol(const char *fmt, unsigned long addr) __builtin_extract_return_addr((void *)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 addr) { + printk("[<%p>]", (void *) addr); + print_symbol(" %s\n", addr); +} #endif /*_LINUX_KALLSYMS_H*/ -- 1.5.4.1