Skip to content

Commit 6ace4f6

Browse files
goyalbhumikaChristoph Hellwig
authored andcommitted
RDMA/cma: make config_item_type const
Make these structures const as they are either passed to the functions having the argument as const or stored as a reference in the "ci_type" const field of a config_item structure. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Doug Ledford <dledford@redhat.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 085006e commit 6ace4f6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎drivers/infiniband/core/cma_configfs.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static struct configfs_attribute *cma_configfs_attributes[] = {
186186
NULL,
187187
};
188188

189-
static struct config_item_type cma_port_group_type = {
189+
static const struct config_item_type cma_port_group_type = {
190190
.ct_attrs = cma_configfs_attributes,
191191
.ct_owner = THIS_MODULE
192192
};
@@ -263,7 +263,7 @@ static struct configfs_item_operations cma_ports_item_ops = {
263263
.release = release_cma_ports_group
264264
};
265265

266-
static struct config_item_type cma_ports_group_type = {
266+
static const struct config_item_type cma_ports_group_type = {
267267
.ct_item_ops = &cma_ports_item_ops,
268268
.ct_owner = THIS_MODULE
269269
};
@@ -272,7 +272,7 @@ static struct configfs_item_operations cma_device_item_ops = {
272272
.release = release_cma_dev
273273
};
274274

275-
static struct config_item_type cma_device_group_type = {
275+
static const struct config_item_type cma_device_group_type = {
276276
.ct_item_ops = &cma_device_item_ops,
277277
.ct_owner = THIS_MODULE
278278
};
@@ -323,7 +323,7 @@ static struct configfs_group_operations cma_subsys_group_ops = {
323323
.make_group = make_cma_dev,
324324
};
325325

326-
static struct config_item_type cma_subsys_type = {
326+
static const struct config_item_type cma_subsys_type = {
327327
.ct_group_ops = &cma_subsys_group_ops,
328328
.ct_owner = THIS_MODULE,
329329
};

0 commit comments

Comments
 (0)