[PATCH 2/2] Constify struct item_operations for 2.6.32-git-053fe57ac v2

From: re . emese
Date: Sun Dec 13 2009 - 19:14:56 EST


From: Emese Revfy <re.emese@xxxxxxxxx>


Signed-off-by: Emese Revfy <re.emese@xxxxxxxxx>
---
include/linux/reiserfs_fs.h | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index a05b4a2..10c0e52 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1590,24 +1590,24 @@ static inline struct super_block *sb_from_bi(struct buffer_info *bi)
*/

struct item_operations {
- int (*bytes_number) (struct item_head * ih, int block_size);
- void (*decrement_key) (struct cpu_key *);
- int (*is_left_mergeable) (struct reiserfs_key * ih,
+ int (* const bytes_number) (struct item_head * ih, int block_size);
+ void (* const decrement_key) (struct cpu_key *);
+ int (* const is_left_mergeable) (struct reiserfs_key * ih,
unsigned long bsize);
- void (*print_item) (struct item_head *, char *item);
- void (*check_item) (struct item_head *, char *item);
+ void (* const print_item) (struct item_head *, char *item);
+ void (* const check_item) (struct item_head *, char *item);

- int (*create_vi) (struct virtual_node * vn, struct virtual_item * vi,
+ int (* const create_vi) (struct virtual_node * vn, struct virtual_item * vi,
int is_affected, int insert_size);
- int (*check_left) (struct virtual_item * vi, int free,
+ int (* const check_left) (struct virtual_item * vi, int free,
int start_skip, int end_skip);
- int (*check_right) (struct virtual_item * vi, int free);
- int (*part_size) (struct virtual_item * vi, int from, int to);
- int (*unit_num) (struct virtual_item * vi);
- void (*print_vi) (struct virtual_item * vi);
+ int (* const check_right) (struct virtual_item * vi, int free);
+ int (* const part_size) (struct virtual_item * vi, int from, int to);
+ int (* const unit_num) (struct virtual_item * vi);
+ void (* const print_vi) (struct virtual_item * vi);
};

-extern struct item_operations *item_ops[TYPE_ANY + 1];
+extern const struct item_operations * const item_ops[TYPE_ANY + 1];

#define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize)
#define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize)
--
1.6.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/