Skip to content

Commit 84c4367

Browse files
goyalbhumikaChristoph Hellwig
authored and
Christoph Hellwig
committed
configfs: make config_item_type const
Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 3f6928c commit 84c4367

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/configfs/configfs_sample.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static struct configfs_attribute *childless_attrs[] = {
115115
NULL,
116116
};
117117

118-
static struct config_item_type childless_type = {
118+
static const struct config_item_type childless_type = {
119119
.ct_attrs = childless_attrs,
120120
.ct_owner = THIS_MODULE,
121121
};
@@ -193,7 +193,7 @@ static struct configfs_item_operations simple_child_item_ops = {
193193
.release = simple_child_release,
194194
};
195195

196-
static struct config_item_type simple_child_type = {
196+
static const struct config_item_type simple_child_type = {
197197
.ct_item_ops = &simple_child_item_ops,
198198
.ct_attrs = simple_child_attrs,
199199
.ct_owner = THIS_MODULE,
@@ -261,7 +261,7 @@ static struct configfs_group_operations simple_children_group_ops = {
261261
.make_item = simple_children_make_item,
262262
};
263263

264-
static struct config_item_type simple_children_type = {
264+
static const struct config_item_type simple_children_type = {
265265
.ct_item_ops = &simple_children_item_ops,
266266
.ct_group_ops = &simple_children_group_ops,
267267
.ct_attrs = simple_children_attrs,
@@ -331,7 +331,7 @@ static struct configfs_group_operations group_children_group_ops = {
331331
.make_group = group_children_make_group,
332332
};
333333

334-
static struct config_item_type group_children_type = {
334+
static const struct config_item_type group_children_type = {
335335
.ct_group_ops = &group_children_group_ops,
336336
.ct_attrs = group_children_attrs,
337337
.ct_owner = THIS_MODULE,

0 commit comments

Comments
 (0)