should __modver_version_attr be const

From: Mark Salter
Date: Mon Apr 25 2011 - 13:28:29 EST


Shouldn't __modver_version_attr be const? It is placed in section
__modver and asm-generic/vmlinux.lds.h puts section __modver in with
RO_DATA_SECTION. Without the const, section __modver has RW attribute.

diff --git a/include/linux/module.h b/include/linux/module.h
index 5de4204..e62f808 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -174,7 +174,7 @@ extern struct module __this_module;
#define MODULE_VERSION(_version) \
extern ssize_t __modver_version_show(struct module_attribute *, \
struct module *, char *); \
- static struct module_version_attribute __modver_version_attr \
+ static const struct module_version_attribute __modver_version_attr \
__used \
__attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \
= { \


--Mark


--
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/