Simplify module_get_kallsym() by dropping length arg

module_get_kallsym() could in theory truncate module symbol name to fit in
buffer, but nobody does this.  Always use KSYM_NAME_LEN + 1 bytes for name.

Suggested by lg^WRusty.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
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:38 -07:00 committed by Linus Torvalds
parent 55955aad7c
commit ae84e32470
3 changed files with 6 additions and 6 deletions

View file

@ -373,7 +373,7 @@ int is_module_address(unsigned long addr);
/* Returns module and fills in value, defined and namebuf, or NULL if
symnum out of range. */
struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
char *type, char *name, size_t namelen);
char *type, char *name);
/* Look for this name: can be of form module:name. */
unsigned long module_kallsyms_lookup_name(const char *name);
@ -529,8 +529,7 @@ static inline const char *module_address_lookup(unsigned long addr,
static inline struct module *module_get_kallsym(unsigned int symnum,
unsigned long *value,
char *type, char *name,
size_t namelen)
char *type, char *name)
{
return NULL;
}