Skip to content

Commit f7f7809

Browse files
tititiou36Andreas Hindborg
authored andcommitted
configfs: Constify ct_item_ops in struct config_item_type
Make 'ct_item_ops' const in struct config_item_type. This allows constification of many structures which hold some function pointers. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Breno Leitao <leitao@debian.org> Link: https://lore.kernel.org/r/f43cb57418a7f59e883be8eedc7d6abe802a2094.1761390472.git.christophe.jaillet@wanadoo.fr Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
1 parent f2f3650 commit f7f7809

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

fs/configfs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct configfs_buffer {
3030
size_t count;
3131
loff_t pos;
3232
char * page;
33-
struct configfs_item_operations * ops;
33+
const struct configfs_item_operations *ops;
3434
struct mutex mutex;
3535
int needs_read_fill;
3636
bool read_in_progress;

include/linux/configfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extern void config_item_put(struct config_item *);
6464

6565
struct config_item_type {
6666
struct module *ct_owner;
67-
struct configfs_item_operations *ct_item_ops;
67+
const struct configfs_item_operations *ct_item_ops;
6868
const struct configfs_group_operations *ct_group_ops;
6969
struct configfs_attribute **ct_attrs;
7070
struct configfs_bin_attribute **ct_bin_attrs;

0 commit comments

Comments
 (0)