aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
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 /fs/proc
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 'fs/proc')
-rw-r--r--fs/proc/base.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index a3e77fb867ea..3b4fe21c7e94 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)
278 */ 278 */
279static int proc_pid_wchan(struct task_struct *task, char *buffer) 279static int proc_pid_wchan(struct task_struct *task, char *buffer)
280{ 280{
281 char *modname;
282 const char *sym_name; 281 const char *sym_name;
283 unsigned long wchan, size, offset; 282 unsigned long wchan;
284 char namebuf[KSYM_NAME_LEN+1]; 283 char namebuf[KSYM_NAME_LEN+1];
285 284
286 wchan = get_wchan(task); 285 wchan = get_wchan(task);
287 286
288 sym_name = kallsyms_lookup(wchan, &size, &offset, &modname, namebuf); 287 sym_name = kallsyms_lookup(wchan, NULL, NULL, NULL, namebuf);
289 if (sym_name) 288 if (sym_name)
290 return sprintf(buffer, "%s", sym_name); 289 return sprintf(buffer, "%s", sym_name);
291 return sprintf(buffer, "%lu", wchan); 290 return sprintf(buffer, "%lu", wchan);