From ffb45122766db220d0bf3d01848d575fbbcb6430 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 8 May 2007 00:28:41 -0700 Subject: Simplify kallsyms_lookup() Several kallsyms_lookup() pass dummy arguments but only need, say, module's name. Make kallsyms_lookup() accept NULLs where possible. Also, makes picture clearer about what interfaces are needed for all symbol resolving business. Signed-off-by: Alexey Dobriyan Cc: Rusty Russell Acked-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/time/timer_list.c | 4 +--- kernel/time/timer_stats.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'kernel/time') diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 59df5e8555a..fe9314a89f2 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -40,11 +40,9 @@ static void print_name_offset(struct seq_file *m, void *sym) { unsigned long addr = (unsigned long)sym; char namebuf[KSYM_NAME_LEN+1]; - unsigned long size, offset; const char *sym_name; - char *modname; - sym_name = kallsyms_lookup(addr, &size, &offset, &modname, namebuf); + sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf); if (sym_name) SEQ_printf(m, "%s", sym_name); else diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 1bc4882e28e..946ed45f7d2 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c @@ -258,11 +258,9 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, static void print_name_offset(struct seq_file *m, unsigned long addr) { char namebuf[KSYM_NAME_LEN+1]; - unsigned long size, offset; const char *sym_name; - char *modname; - sym_name = kallsyms_lookup(addr, &size, &offset, &modname, namebuf); + sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf); if (sym_name) seq_printf(m, "%s", sym_name); else -- cgit v1.2.3