From d54b1fdb1d9f82e375a299e22bd366aad52d4c34 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:34 -0800 Subject: [PATCH] mark struct file_operations const 5 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 --- drivers/message/i2o/i2o_proc.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'drivers/message/i2o/i2o_proc.c') diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index a61cb17c5c12..06892ac2286e 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c @@ -1703,133 +1703,133 @@ static int i2o_seq_open_dev_name(struct inode *inode, struct file *file) return single_open(file, i2o_seq_show_dev_name, PDE(inode)->data); }; -static struct file_operations i2o_seq_fops_lct = { +static const struct file_operations i2o_seq_fops_lct = { .open = i2o_seq_open_lct, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_hrt = { +static const struct file_operations i2o_seq_fops_hrt = { .open = i2o_seq_open_hrt, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_status = { +static const struct file_operations i2o_seq_fops_status = { .open = i2o_seq_open_status, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_hw = { +static const struct file_operations i2o_seq_fops_hw = { .open = i2o_seq_open_hw, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_ddm_table = { +static const struct file_operations i2o_seq_fops_ddm_table = { .open = i2o_seq_open_ddm_table, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_driver_store = { +static const struct file_operations i2o_seq_fops_driver_store = { .open = i2o_seq_open_driver_store, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_drivers_stored = { +static const struct file_operations i2o_seq_fops_drivers_stored = { .open = i2o_seq_open_drivers_stored, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_groups = { +static const struct file_operations i2o_seq_fops_groups = { .open = i2o_seq_open_groups, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_phys_device = { +static const struct file_operations i2o_seq_fops_phys_device = { .open = i2o_seq_open_phys_device, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_claimed = { +static const struct file_operations i2o_seq_fops_claimed = { .open = i2o_seq_open_claimed, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_users = { +static const struct file_operations i2o_seq_fops_users = { .open = i2o_seq_open_users, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_priv_msgs = { +static const struct file_operations i2o_seq_fops_priv_msgs = { .open = i2o_seq_open_priv_msgs, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_authorized_users = { +static const struct file_operations i2o_seq_fops_authorized_users = { .open = i2o_seq_open_authorized_users, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_dev_name = { +static const struct file_operations i2o_seq_fops_dev_name = { .open = i2o_seq_open_dev_name, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_dev_identity = { +static const struct file_operations i2o_seq_fops_dev_identity = { .open = i2o_seq_open_dev_identity, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_ddm_identity = { +static const struct file_operations i2o_seq_fops_ddm_identity = { .open = i2o_seq_open_ddm_identity, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_uinfo = { +static const struct file_operations i2o_seq_fops_uinfo = { .open = i2o_seq_open_uinfo, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_sgl_limits = { +static const struct file_operations i2o_seq_fops_sgl_limits = { .open = i2o_seq_open_sgl_limits, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; -static struct file_operations i2o_seq_fops_sensors = { +static const struct file_operations i2o_seq_fops_sensors = { .open = i2o_seq_open_sensors, .read = seq_read, .llseek = seq_lseek, -- cgit v1.2.3