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:
Alexey Dobriyan 2007-05-08 00:28:41 -07:00 committed by Linus Torvalds
parent ea07890a68
commit ffb4512276
10 changed files with 20 additions and 28 deletions

View file

@ -340,10 +340,7 @@ static const char *usage_str[] =
const char * __get_key_name(struct lockdep_subclass_key *key, char *str)
{
unsigned long offs, size;
char *modname;
return kallsyms_lookup((unsigned long)key, &size, &offs, &modname, str);
return kallsyms_lookup((unsigned long)key, NULL, NULL, NULL, str);
}
void