From 5cd2e0c4d66f6f682539d67d5f1dbc8123a242ed Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:32 -0800 Subject: [PATCH] mark struct file_operations const 3 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- crypto/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/proc.c') diff --git a/crypto/proc.c b/crypto/proc.c index dabce067..102c751a 100644 --- a/crypto/proc.c +++ b/crypto/proc.c @@ -101,7 +101,7 @@ static int crypto_info_open(struct inode *inode, struct file *file) return seq_open(file, &crypto_seq_ops); } -static struct file_operations proc_crypto_ops = { +static const struct file_operations proc_crypto_ops = { .open = crypto_info_open, .read = seq_read, .llseek = seq_lseek, -- cgit v1.2.3