From: Mark Salter <msalter@redhat.com>
To: linux-kernel@vger.kernel.org
Subject: should __modver_version_attr be const
Date: Mon, 25 Apr 2011 13:28:22 -0400 [thread overview]
Message-ID: <1303752502.2103.169.camel@deneb.localdomain> (raw)
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
reply other threads:[~2011-04-25 17:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1303752502.2103.169.camel@deneb.localdomain \
--to=msalter@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®