Skip to content

Commit abc36be

Browse files
committed
Merge tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/configfs
Pull configfs updates from Christoph Hellwig: "A couple of configfs cleanups: - proper use of the bool type (Thomas Meyer) - constification of struct config_item_type (Bhumika Goyal)" * tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/configfs: RDMA/cma: make config_item_type const stm class: make config_item_type const ACPI: configfs: make config_item_type const nvmet: make config_item_type const usb: gadget: configfs: make config_item_type const PCI: endpoint: make config_item_type const iio: make function argument and some structures const usb: gadget: make config_item_type structures const dlm: make config_item_type const netconsole: make config_item_type const nullb: make config_item_type const ocfs2/cluster: make config_item_type const target: make config_item_type const configfs: make ci_type field, some pointers and function arguments const configfs: make config_item_type const configfs: Fix bool initialization/comparison
2 parents f14fc0c + 6ace4f6 commit abc36be

50 files changed

Lines changed: 165 additions & 165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/acpi/acpi_configfs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct configfs_attribute *acpi_table_attrs[] = {
204204
NULL,
205205
};
206206

207-
static struct config_item_type acpi_table_type = {
207+
static const struct config_item_type acpi_table_type = {
208208
.ct_owner = THIS_MODULE,
209209
.ct_bin_attrs = acpi_table_bin_attrs,
210210
.ct_attrs = acpi_table_attrs,
@@ -237,12 +237,12 @@ struct configfs_group_operations acpi_table_group_ops = {
237237
.drop_item = acpi_table_drop_item,
238238
};
239239

240-
static struct config_item_type acpi_tables_type = {
240+
static const struct config_item_type acpi_tables_type = {
241241
.ct_owner = THIS_MODULE,
242242
.ct_group_ops = &acpi_table_group_ops,
243243
};
244244

245-
static struct config_item_type acpi_root_group_type = {
245+
static const struct config_item_type acpi_root_group_type = {
246246
.ct_owner = THIS_MODULE,
247247
};
248248

‎drivers/block/null_blk.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static struct configfs_item_operations nullb_device_ops = {
476476
.release = nullb_device_release,
477477
};
478478

479-
static struct config_item_type nullb_device_type = {
479+
static const struct config_item_type nullb_device_type = {
480480
.ct_item_ops = &nullb_device_ops,
481481
.ct_attrs = nullb_device_attrs,
482482
.ct_owner = THIS_MODULE,
@@ -528,7 +528,7 @@ static struct configfs_group_operations nullb_group_ops = {
528528
.drop_item = nullb_group_drop_item,
529529
};
530530

531-
static struct config_item_type nullb_group_type = {
531+
static const struct config_item_type nullb_group_type = {
532532
.ct_group_ops = &nullb_group_ops,
533533
.ct_attrs = nullb_group_attrs,
534534
.ct_owner = THIS_MODULE,

‎drivers/hwtracing/stm/policy.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ static struct configfs_attribute *stp_policy_node_attrs[] = {
187187
NULL,
188188
};
189189

190-
static struct config_item_type stp_policy_type;
191-
static struct config_item_type stp_policy_node_type;
190+
static const struct config_item_type stp_policy_type;
191+
static const struct config_item_type stp_policy_node_type;
192192

193193
static struct config_group *
194194
stp_policy_node_make(struct config_group *group, const char *name)
@@ -236,7 +236,7 @@ static struct configfs_group_operations stp_policy_node_group_ops = {
236236
.drop_item = stp_policy_node_drop,
237237
};
238238

239-
static struct config_item_type stp_policy_node_type = {
239+
static const struct config_item_type stp_policy_node_type = {
240240
.ct_item_ops = &stp_policy_node_item_ops,
241241
.ct_group_ops = &stp_policy_node_group_ops,
242242
.ct_attrs = stp_policy_node_attrs,
@@ -311,7 +311,7 @@ static struct configfs_group_operations stp_policy_group_ops = {
311311
.make_group = stp_policy_node_make,
312312
};
313313

314-
static struct config_item_type stp_policy_type = {
314+
static const struct config_item_type stp_policy_type = {
315315
.ct_item_ops = &stp_policy_item_ops,
316316
.ct_group_ops = &stp_policy_group_ops,
317317
.ct_attrs = stp_policy_attrs,
@@ -380,7 +380,7 @@ static struct configfs_group_operations stp_policies_group_ops = {
380380
.make_group = stp_policies_make,
381381
};
382382

383-
static struct config_item_type stp_policies_type = {
383+
static const struct config_item_type stp_policies_type = {
384384
.ct_group_ops = &stp_policies_group_ops,
385385
.ct_owner = THIS_MODULE,
386386
};

‎drivers/iio/dummy/iio_simple_dummy.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <linux/iio/sw_device.h>
2727
#include "iio_simple_dummy.h"
2828

29-
static struct config_item_type iio_dummy_type = {
29+
static const struct config_item_type iio_dummy_type = {
3030
.ct_owner = THIS_MODULE,
3131
};
3232

‎drivers/iio/industrialio-configfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <linux/iio/iio.h>
1818
#include <linux/iio/configfs.h>
1919

20-
static struct config_item_type iio_root_group_type = {
20+
static const struct config_item_type iio_root_group_type = {
2121
.ct_owner = THIS_MODULE,
2222
};
2323

‎drivers/iio/industrialio-sw-device.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <linux/configfs.h>
2020

2121
static struct config_group *iio_devices_group;
22-
static struct config_item_type iio_device_type_group_type;
22+
static const struct config_item_type iio_device_type_group_type;
2323

24-
static struct config_item_type iio_devices_group_type = {
24+
static const struct config_item_type iio_devices_group_type = {
2525
.ct_owner = THIS_MODULE,
2626
};
2727

@@ -156,7 +156,7 @@ static struct configfs_group_operations device_ops = {
156156
.drop_item = &device_drop_group,
157157
};
158158

159-
static struct config_item_type iio_device_type_group_type = {
159+
static const struct config_item_type iio_device_type_group_type = {
160160
.ct_group_ops = &device_ops,
161161
.ct_owner = THIS_MODULE,
162162
};

‎drivers/iio/industrialio-sw-trigger.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include <linux/configfs.h>
2020

2121
static struct config_group *iio_triggers_group;
22-
static struct config_item_type iio_trigger_type_group_type;
22+
static const struct config_item_type iio_trigger_type_group_type;
2323

24-
static struct config_item_type iio_triggers_group_type = {
24+
static const struct config_item_type iio_triggers_group_type = {
2525
.ct_owner = THIS_MODULE,
2626
};
2727

@@ -156,7 +156,7 @@ static struct configfs_group_operations trigger_ops = {
156156
.drop_item = &trigger_drop_group,
157157
};
158158

159-
static struct config_item_type iio_trigger_type_group_type = {
159+
static const struct config_item_type iio_trigger_type_group_type = {
160160
.ct_group_ops = &trigger_ops,
161161
.ct_owner = THIS_MODULE,
162162
};

‎drivers/iio/trigger/iio-trig-hrtimer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct iio_hrtimer_info {
3030
ktime_t period;
3131
};
3232

33-
static struct config_item_type iio_hrtimer_type = {
33+
static const struct config_item_type iio_hrtimer_type = {
3434
.ct_owner = THIS_MODULE,
3535
};
3636

‎drivers/iio/trigger/iio-trig-loop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct iio_loop_info {
3636
struct task_struct *task;
3737
};
3838

39-
static struct config_item_type iio_loop_type = {
39+
static const struct config_item_type iio_loop_type = {
4040
.ct_owner = THIS_MODULE,
4141
};
4242

‎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)