diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2007-02-12 03:55:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:44 -0500 |
commit | 5dfe4c964a0dd7bb3a1d64a4166835a153146207 (patch) | |
tree | 2fb2fd8c09922be4f40a5a9ac50b537b1d780e27 /arch/ia64/kernel/perfmon.c | |
parent | 540473208f8ac71c25a87e1a2670c3c18dd4d6db (diff) |
[PATCH] mark struct file_operations const 2
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.
[akpm@osdl.org: sparc64 fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/ia64/kernel/perfmon.c')
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 86e144f321ff..9860794a68fb 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -621,7 +621,7 @@ EXPORT_PER_CPU_SYMBOL_GPL(pfm_syst_info); | |||
621 | 621 | ||
622 | 622 | ||
623 | /* forward declaration */ | 623 | /* forward declaration */ |
624 | static struct file_operations pfm_file_ops; | 624 | static const struct file_operations pfm_file_ops; |
625 | 625 | ||
626 | /* | 626 | /* |
627 | * forward declarations | 627 | * forward declarations |
@@ -2126,7 +2126,7 @@ pfm_no_open(struct inode *irrelevant, struct file *dontcare) | |||
2126 | 2126 | ||
2127 | 2127 | ||
2128 | 2128 | ||
2129 | static struct file_operations pfm_file_ops = { | 2129 | static const struct file_operations pfm_file_ops = { |
2130 | .llseek = no_llseek, | 2130 | .llseek = no_llseek, |
2131 | .read = pfm_read, | 2131 | .read = pfm_read, |
2132 | .write = pfm_write, | 2132 | .write = pfm_write, |
@@ -6596,7 +6596,7 @@ found: | |||
6596 | return 0; | 6596 | return 0; |
6597 | } | 6597 | } |
6598 | 6598 | ||
6599 | static struct file_operations pfm_proc_fops = { | 6599 | static const struct file_operations pfm_proc_fops = { |
6600 | .open = pfm_proc_open, | 6600 | .open = pfm_proc_open, |
6601 | .read = seq_read, | 6601 | .read = seq_read, |
6602 | .llseek = seq_lseek, | 6602 | .llseek = seq_lseek, |