aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@sw.ru>2007-05-08 03:28:41 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:08 -0400
commitffb45122766db220d0bf3d01848d575fbbcb6430 (patch)
treea8fedf0518407ad12578a7c03aa2c3344f11ff3c /kernel/time
parentea07890a680273b25127129fb555aac0d9324bea (diff)
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 <adobriyan@sw.ru> Cc: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/time')
-rw-r--r--kernel/time/timer_list.c4
-rw-r--r--kernel/time/timer_stats.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index 59df5e8555a8..fe9314a89f20 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)
40{ 40{
41 unsigned long addr = (unsigned long)sym; 41 unsigned long addr = (unsigned long)sym;
42 char namebuf[KSYM_NAME_LEN+1]; 42 char namebuf[KSYM_NAME_LEN+1];
43 unsigned long size, offset;
44 const char *sym_name; 43 const char *sym_name;
45 char *modname;
46 44
47 sym_name = kallsyms_lookup(addr, &size, &offset, &modname, namebuf); 45 sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf);
48 if (sym_name) 46 if (sym_name)
49 SEQ_printf(m, "%s", sym_name); 47 SEQ_printf(m, "%s", sym_name);
50 else 48 else
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
index 1bc4882e28e0..946ed45f7d2f 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,
258static void print_name_offset(struct seq_file *m, unsigned long addr) 258static void print_name_offset(struct seq_file *m, unsigned long addr)
259{ 259{
260 char namebuf[KSYM_NAME_LEN+1]; 260 char namebuf[KSYM_NAME_LEN+1];
261 unsigned long size, offset;
262 const char *sym_name; 261 const char *sym_name;
263 char *modname;
264 262
265 sym_name = kallsyms_lookup(addr, &size, &offset, &modname, namebuf); 263 sym_name = kallsyms_lookup(addr, NULL, NULL, NULL, namebuf);
266 if (sym_name) 264 if (sym_name)
267 seq_printf(m, "%s", sym_name); 265 seq_printf(m, "%s", sym_name);
268 else 266 else