aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/kallsyms.c
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/kallsyms.c
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/kallsyms.c')
-rw-r--r--kernel/kallsyms.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
index f1ea6f66ac6c..f66da025cb7f 100644
--- a/kernel/kallsyms.c
+++ b/kernel/kallsyms.c
@@ -214,8 +214,10 @@ static unsigned long get_symbol_pos(unsigned long addr,
214 symbol_end = (unsigned long)_etext; 214 symbol_end = (unsigned long)_etext;
215 } 215 }
216 216
217 *symbolsize = symbol_end - symbol_start; 217 if (symbolsize)
218 *offset = addr - symbol_start; 218 *symbolsize = symbol_end - symbol_start;
219 if (offset)
220 *offset = addr - symbol_start;
219 221
220 return low; 222 return low;
221} 223}