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/salinfo.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/salinfo.c')
-rw-r--r-- | arch/ia64/kernel/salinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/ia64/kernel/salinfo.c b/arch/ia64/kernel/salinfo.c index e375a2f0f2c3..af9f8754d847 100644 --- a/arch/ia64/kernel/salinfo.c +++ b/arch/ia64/kernel/salinfo.c | |||
@@ -352,7 +352,7 @@ retry: | |||
352 | return size; | 352 | return size; |
353 | } | 353 | } |
354 | 354 | ||
355 | static struct file_operations salinfo_event_fops = { | 355 | static const struct file_operations salinfo_event_fops = { |
356 | .open = salinfo_event_open, | 356 | .open = salinfo_event_open, |
357 | .read = salinfo_event_read, | 357 | .read = salinfo_event_read, |
358 | }; | 358 | }; |
@@ -568,7 +568,7 @@ salinfo_log_write(struct file *file, const char __user *buffer, size_t count, lo | |||
568 | return count; | 568 | return count; |
569 | } | 569 | } |
570 | 570 | ||
571 | static struct file_operations salinfo_data_fops = { | 571 | static const struct file_operations salinfo_data_fops = { |
572 | .open = salinfo_log_open, | 572 | .open = salinfo_log_open, |
573 | .release = salinfo_log_release, | 573 | .release = salinfo_log_release, |
574 | .read = salinfo_log_read, | 574 | .read = salinfo_log_read, |