[PATCH] (trivial) Fix compiler warning in kernel/modules.c

From: Michał Mirosław
Date: Sun Sep 19 2010 - 20:06:04 EST


Building with CONFIG_KALLSYMS=n gives following warning:

/mnt/src/linux-git/kernel/module.c: In function âpost_relocationâ:
/mnt/src/linux-git/kernel/module.c:2534:2: warning: passing argument 2 of âadd_kallsymsâ discards qualifiers from pointer target type
/mnt/src/linux-git/kernel/module.c:2038:13: note: expected âstruct load_info *â but argument is of type âconst struct load_info *â

Signed-off-by: MichaÅ MirosÅaw <mirq-linux@xxxxxxxxxxxx>
---
kernel/module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

For current git (2.6.36-rc4).


diff --git a/kernel/module.c b/kernel/module.c
index d0b5f8d..452052c 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2035,7 +2035,7 @@ static inline void layout_symtab(struct module *mod, struct load_info *info)
{
}

-static void add_kallsyms(struct module *mod, struct load_info *info)
+static void add_kallsyms(struct module *mod, const struct load_info *info)
{
}
#endif /* CONFIG_KALLSYMS */
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/