diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-05-08 03:28:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:08 -0400 |
commit | ae84e324709d6320ed8c1fd7b1736fcbaf26df95 (patch) | |
tree | bb3b623f2fd491771c716957622a72e86e9582dd /include/linux/module.h | |
parent | 55955aad7c09e4d93029d0cf2d360b41891f2fe4 (diff) |
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>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index f0b0faf42d5d..799930216626 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -373,7 +373,7 @@ int is_module_address(unsigned long addr); | |||
373 | /* Returns module and fills in value, defined and namebuf, or NULL if | 373 | /* Returns module and fills in value, defined and namebuf, or NULL if |
374 | symnum out of range. */ | 374 | symnum out of range. */ |
375 | struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, | 375 | struct module *module_get_kallsym(unsigned int symnum, unsigned long *value, |
376 | char *type, char *name, size_t namelen); | 376 | char *type, char *name); |
377 | 377 | ||
378 | /* Look for this name: can be of form module:name. */ | 378 | /* Look for this name: can be of form module:name. */ |
379 | unsigned long module_kallsyms_lookup_name(const char *name); | 379 | unsigned long module_kallsyms_lookup_name(const char *name); |
@@ -529,8 +529,7 @@ static inline const char *module_address_lookup(unsigned long addr, | |||
529 | 529 | ||
530 | static inline struct module *module_get_kallsym(unsigned int symnum, | 530 | static inline struct module *module_get_kallsym(unsigned int symnum, |
531 | unsigned long *value, | 531 | unsigned long *value, |
532 | char *type, char *name, | 532 | char *type, char *name) |
533 | size_t namelen) | ||
534 | { | 533 | { |
535 | return NULL; | 534 | return NULL; |
536 | } | 535 | } |