From ae84e324709d6320ed8c1fd7b1736fcbaf26df95 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 8 May 2007 00:28:38 -0700 Subject: 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 Acked-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/module.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') 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); /* 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; } -- cgit v1.2.3-55-g7522