From: Andrew Morton kernel/module.c: In function 'module_address_lookup': kernel/module.c:2241: warning: return discards qualifiers from pointer target type Cc: Ingo Molnar Cc: Kyle McMartin Cc: Rusty Russell Signed-off-by: Andrew Morton --- include/linux/module.h | 4 ++-- kernel/module.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff -puN include/linux/module.h~modules-make-module_address_lookup-safe-fix include/linux/module.h --- a/include/linux/module.h~modules-make-module_address_lookup-safe-fix +++ a/include/linux/module.h @@ -452,7 +452,7 @@ static inline void __module_get(struct m /* For kallsyms to ask for address resolution. namebuf should be at * least KSYM_NAME_LEN long: a pointer to namebuf is returned if * found, otherwise NULL. */ -char *module_address_lookup(unsigned long addr, +const char *module_address_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, @@ -522,7 +522,7 @@ static inline void module_put(struct mod #define module_name(mod) "kernel" /* For kallsyms to ask for address resolution. NULL means not found. */ -static inline char *module_address_lookup(unsigned long addr, +static inline const char *module_address_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, diff -puN kernel/module.c~modules-make-module_address_lookup-safe-fix kernel/module.c --- a/kernel/module.c~modules-make-module_address_lookup-safe-fix +++ a/kernel/module.c @@ -2261,7 +2261,7 @@ static const char *get_ksymbol(struct mo /* For kallsyms to ask for address resolution. NULL means not found. Careful * not to lock to avoid deadlock on oopses, simply disable preemption. */ -char *module_address_lookup(unsigned long addr, +const char *module_address_lookup(unsigned long addr, unsigned long *size, unsigned long *offset, char **modname, _