aboutsummaryrefslogtreecommitdiffstats
path: root/net/appletalk
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:46 -0500
commit9a32144e9d7b4e21341174b1a83b82a82353be86 (patch)
tree6f08560b341418fc9934f56f6162a95f5b5d8aec /net/appletalk
parent00977a59b951207d38380c75f03a36829950265c (diff)
[PATCH] mark struct file_operations const 7
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. 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 'net/appletalk')
-rw-r--r--net/appletalk/aarp.c2
-rw-r--r--net/appletalk/atalk_proc.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 27e845d260a9..d89d62f3702f 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -1048,7 +1048,7 @@ out_kfree:
1048 goto out; 1048 goto out;
1049} 1049}
1050 1050
1051struct file_operations atalk_seq_arp_fops = { 1051const struct file_operations atalk_seq_arp_fops = {
1052 .owner = THIS_MODULE, 1052 .owner = THIS_MODULE,
1053 .open = aarp_seq_open, 1053 .open = aarp_seq_open,
1054 .read = seq_read, 1054 .read = seq_read,
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
index bc3015f277ba..57ff8122b5c5 100644
--- a/net/appletalk/atalk_proc.c
+++ b/net/appletalk/atalk_proc.c
@@ -240,7 +240,7 @@ static int atalk_seq_socket_open(struct inode *inode, struct file *file)
240 return seq_open(file, &atalk_seq_socket_ops); 240 return seq_open(file, &atalk_seq_socket_ops);
241} 241}
242 242
243static struct file_operations atalk_seq_interface_fops = { 243static const struct file_operations atalk_seq_interface_fops = {
244 .owner = THIS_MODULE, 244 .owner = THIS_MODULE,
245 .open = atalk_seq_interface_open, 245 .open = atalk_seq_interface_open,
246 .read = seq_read, 246 .read = seq_read,
@@ -248,7 +248,7 @@ static struct file_operations atalk_seq_interface_fops = {
248 .release = seq_release, 248 .release = seq_release,
249}; 249};
250 250
251static struct file_operations atalk_seq_route_fops = { 251static const struct file_operations atalk_seq_route_fops = {
252 .owner = THIS_MODULE, 252 .owner = THIS_MODULE,
253 .open = atalk_seq_route_open, 253 .open = atalk_seq_route_open,
254 .read = seq_read, 254 .read = seq_read,
@@ -256,7 +256,7 @@ static struct file_operations atalk_seq_route_fops = {
256 .release = seq_release, 256 .release = seq_release,
257}; 257};
258 258
259static struct file_operations atalk_seq_socket_fops = { 259static const struct file_operations atalk_seq_socket_fops = {
260 .owner = THIS_MODULE, 260 .owner = THIS_MODULE,
261 .open = atalk_seq_socket_open, 261 .open = atalk_seq_socket_open,
262 .read = seq_read, 262 .read = seq_read,