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>
This commit is contained in:
committed by
Linus Torvalds
parent
ea07890a68
commit
ffb4512276
@@ -1217,7 +1217,6 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp,
|
||||
{
|
||||
unsigned long size, offset;
|
||||
const char *name;
|
||||
char *modname;
|
||||
|
||||
*startp = *endp = 0;
|
||||
if (pc == 0)
|
||||
@@ -1225,7 +1224,7 @@ static void get_function_bounds(unsigned long pc, unsigned long *startp,
|
||||
if (setjmp(bus_error_jmp) == 0) {
|
||||
catch_memory_errors = 1;
|
||||
sync();
|
||||
name = kallsyms_lookup(pc, &size, &offset, &modname, tmpstr);
|
||||
name = kallsyms_lookup(pc, &size, &offset, NULL, tmpstr);
|
||||
if (name != NULL) {
|
||||
*startp = pc - offset;
|
||||
*endp = pc - offset + size;
|
||||
|
Reference in New Issue
Block a user