diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-05-08 00:28:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 11:15:08 -0700 |
commit | ffb45122766db220d0bf3d01848d575fbbcb6430 (patch) | |
tree | a8fedf0518407ad12578a7c03aa2c3344f11ff3c /fs/proc | |
parent | ea07890a680273b25127129fb555aac0d9324bea (diff) | |
download | kernel-crypto-ffb45122766db220d0bf3d01848d575fbbcb6430.tar.gz kernel-crypto-ffb45122766db220d0bf3d01848d575fbbcb6430.tar.xz kernel-crypto-ffb45122766db220d0bf3d01848d575fbbcb6430.zip |
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 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index a3e77fb867e..3b4fe21c7e9 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -278,14 +278,13 @@ static int proc_pid_auxv(struct task_struct *task, char *buffer) */ static int proc_pid_wchan(struct task_struct *task, char *buffer) { - char *modname; const char *sym_name; - unsigned long wchan, size, offset; + unsigned long wchan; char namebuf[KSYM_NAME_LEN+1]; wchan = get_wchan(task); - sym_name = kallsyms_lookup(wchan, &size, &offset, &modname, namebuf); + sym_name = kallsyms_lookup(wchan, NULL, NULL, NULL, namebuf); if (sym_name) return sprintf(buffer, "%s", sym_name); return sprintf(buffer, "%lu", wchan); |