Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christophe JAILLET and committed by
Andreas Hindborg
f7f78098 f2f36500

+2 -2
+1 -1
fs/configfs/file.c
··· 30 30 size_t count; 31 31 loff_t pos; 32 32 char * page; 33 - struct configfs_item_operations * ops; 33 + const struct configfs_item_operations *ops; 34 34 struct mutex mutex; 35 35 int needs_read_fill; 36 36 bool read_in_progress;
+1 -1
include/linux/configfs.h
··· 64 64 65 65 struct config_item_type { 66 66 struct module *ct_owner; 67 - struct configfs_item_operations *ct_item_ops; 67 + const struct configfs_item_operations *ct_item_ops; 68 68 const struct configfs_group_operations *ct_group_ops; 69 69 struct configfs_attribute **ct_attrs; 70 70 struct configfs_bin_attribute **ct_bin_attrs;