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

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

+165 -165
+3 -3
drivers/acpi/acpi_configfs.c
··· 204 204 NULL, 205 205 }; 206 206 207 - static struct config_item_type acpi_table_type = { 207 + static const struct config_item_type acpi_table_type = { 208 208 .ct_owner = THIS_MODULE, 209 209 .ct_bin_attrs = acpi_table_bin_attrs, 210 210 .ct_attrs = acpi_table_attrs, ··· 237 237 .drop_item = acpi_table_drop_item, 238 238 }; 239 239 240 - static struct config_item_type acpi_tables_type = { 240 + static const struct config_item_type acpi_tables_type = { 241 241 .ct_owner = THIS_MODULE, 242 242 .ct_group_ops = &acpi_table_group_ops, 243 243 }; 244 244 245 - static struct config_item_type acpi_root_group_type = { 245 + static const struct config_item_type acpi_root_group_type = { 246 246 .ct_owner = THIS_MODULE, 247 247 }; 248 248
+2 -2
drivers/block/null_blk.c
··· 476 476 .release = nullb_device_release, 477 477 }; 478 478 479 - static struct config_item_type nullb_device_type = { 479 + static const struct config_item_type nullb_device_type = { 480 480 .ct_item_ops = &nullb_device_ops, 481 481 .ct_attrs = nullb_device_attrs, 482 482 .ct_owner = THIS_MODULE, ··· 528 528 .drop_item = nullb_group_drop_item, 529 529 }; 530 530 531 - static struct config_item_type nullb_group_type = { 531 + static const struct config_item_type nullb_group_type = { 532 532 .ct_group_ops = &nullb_group_ops, 533 533 .ct_attrs = nullb_group_attrs, 534 534 .ct_owner = THIS_MODULE,
+5 -5
drivers/hwtracing/stm/policy.c
··· 187 187 NULL, 188 188 }; 189 189 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; 192 192 193 193 static struct config_group * 194 194 stp_policy_node_make(struct config_group *group, const char *name) ··· 236 236 .drop_item = stp_policy_node_drop, 237 237 }; 238 238 239 - static struct config_item_type stp_policy_node_type = { 239 + static const struct config_item_type stp_policy_node_type = { 240 240 .ct_item_ops = &stp_policy_node_item_ops, 241 241 .ct_group_ops = &stp_policy_node_group_ops, 242 242 .ct_attrs = stp_policy_node_attrs, ··· 311 311 .make_group = stp_policy_node_make, 312 312 }; 313 313 314 - static struct config_item_type stp_policy_type = { 314 + static const struct config_item_type stp_policy_type = { 315 315 .ct_item_ops = &stp_policy_item_ops, 316 316 .ct_group_ops = &stp_policy_group_ops, 317 317 .ct_attrs = stp_policy_attrs, ··· 380 380 .make_group = stp_policies_make, 381 381 }; 382 382 383 - static struct config_item_type stp_policies_type = { 383 + static const struct config_item_type stp_policies_type = { 384 384 .ct_group_ops = &stp_policies_group_ops, 385 385 .ct_owner = THIS_MODULE, 386 386 };
+1 -1
drivers/iio/dummy/iio_simple_dummy.c
··· 26 26 #include <linux/iio/sw_device.h> 27 27 #include "iio_simple_dummy.h" 28 28 29 - static struct config_item_type iio_dummy_type = { 29 + static const struct config_item_type iio_dummy_type = { 30 30 .ct_owner = THIS_MODULE, 31 31 }; 32 32
+1 -1
drivers/iio/industrialio-configfs.c
··· 17 17 #include <linux/iio/iio.h> 18 18 #include <linux/iio/configfs.h> 19 19 20 - static struct config_item_type iio_root_group_type = { 20 + static const struct config_item_type iio_root_group_type = { 21 21 .ct_owner = THIS_MODULE, 22 22 }; 23 23
+3 -3
drivers/iio/industrialio-sw-device.c
··· 19 19 #include <linux/configfs.h> 20 20 21 21 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; 23 23 24 - static struct config_item_type iio_devices_group_type = { 24 + static const struct config_item_type iio_devices_group_type = { 25 25 .ct_owner = THIS_MODULE, 26 26 }; 27 27 ··· 156 156 .drop_item = &device_drop_group, 157 157 }; 158 158 159 - static struct config_item_type iio_device_type_group_type = { 159 + static const struct config_item_type iio_device_type_group_type = { 160 160 .ct_group_ops = &device_ops, 161 161 .ct_owner = THIS_MODULE, 162 162 };
+3 -3
drivers/iio/industrialio-sw-trigger.c
··· 19 19 #include <linux/configfs.h> 20 20 21 21 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; 23 23 24 - static struct config_item_type iio_triggers_group_type = { 24 + static const struct config_item_type iio_triggers_group_type = { 25 25 .ct_owner = THIS_MODULE, 26 26 }; 27 27 ··· 156 156 .drop_item = &trigger_drop_group, 157 157 }; 158 158 159 - static struct config_item_type iio_trigger_type_group_type = { 159 + static const struct config_item_type iio_trigger_type_group_type = { 160 160 .ct_group_ops = &trigger_ops, 161 161 .ct_owner = THIS_MODULE, 162 162 };
+1 -1
drivers/iio/trigger/iio-trig-hrtimer.c
··· 30 30 ktime_t period; 31 31 }; 32 32 33 - static struct config_item_type iio_hrtimer_type = { 33 + static const struct config_item_type iio_hrtimer_type = { 34 34 .ct_owner = THIS_MODULE, 35 35 }; 36 36
+1 -1
drivers/iio/trigger/iio-trig-loop.c
··· 36 36 struct task_struct *task; 37 37 }; 38 38 39 - static struct config_item_type iio_loop_type = { 39 + static const struct config_item_type iio_loop_type = { 40 40 .ct_owner = THIS_MODULE, 41 41 }; 42 42
+4 -4
drivers/infiniband/core/cma_configfs.c
··· 186 186 NULL, 187 187 }; 188 188 189 - static struct config_item_type cma_port_group_type = { 189 + static const struct config_item_type cma_port_group_type = { 190 190 .ct_attrs = cma_configfs_attributes, 191 191 .ct_owner = THIS_MODULE 192 192 }; ··· 263 263 .release = release_cma_ports_group 264 264 }; 265 265 266 - static struct config_item_type cma_ports_group_type = { 266 + static const struct config_item_type cma_ports_group_type = { 267 267 .ct_item_ops = &cma_ports_item_ops, 268 268 .ct_owner = THIS_MODULE 269 269 }; ··· 272 272 .release = release_cma_dev 273 273 }; 274 274 275 - static struct config_item_type cma_device_group_type = { 275 + static const struct config_item_type cma_device_group_type = { 276 276 .ct_item_ops = &cma_device_item_ops, 277 277 .ct_owner = THIS_MODULE 278 278 }; ··· 323 323 .make_group = make_cma_dev, 324 324 }; 325 325 326 - static struct config_item_type cma_subsys_type = { 326 + static const struct config_item_type cma_subsys_type = { 327 327 .ct_group_ops = &cma_subsys_group_ops, 328 328 .ct_owner = THIS_MODULE, 329 329 };
+2 -2
drivers/net/netconsole.c
··· 616 616 .release = netconsole_target_release, 617 617 }; 618 618 619 - static struct config_item_type netconsole_target_type = { 619 + static const struct config_item_type netconsole_target_type = { 620 620 .ct_attrs = netconsole_target_attrs, 621 621 .ct_item_ops = &netconsole_target_item_ops, 622 622 .ct_owner = THIS_MODULE, ··· 682 682 .drop_item = drop_netconsole_target, 683 683 }; 684 684 685 - static struct config_item_type netconsole_subsys_type = { 685 + static const struct config_item_type netconsole_subsys_type = { 686 686 .ct_group_ops = &netconsole_subsys_group_ops, 687 687 .ct_owner = THIS_MODULE, 688 688 };
+15 -15
drivers/nvme/target/configfs.c
··· 20 20 21 21 #include "nvmet.h" 22 22 23 - static struct config_item_type nvmet_host_type; 24 - static struct config_item_type nvmet_subsys_type; 23 + static const struct config_item_type nvmet_host_type; 24 + static const struct config_item_type nvmet_subsys_type; 25 25 26 26 /* 27 27 * nvmet_port Generic ConfigFS definitions. ··· 425 425 .release = nvmet_ns_release, 426 426 }; 427 427 428 - static struct config_item_type nvmet_ns_type = { 428 + static const struct config_item_type nvmet_ns_type = { 429 429 .ct_item_ops = &nvmet_ns_item_ops, 430 430 .ct_attrs = nvmet_ns_attrs, 431 431 .ct_owner = THIS_MODULE, ··· 464 464 .make_group = nvmet_ns_make, 465 465 }; 466 466 467 - static struct config_item_type nvmet_namespaces_type = { 467 + static const struct config_item_type nvmet_namespaces_type = { 468 468 .ct_group_ops = &nvmet_namespaces_group_ops, 469 469 .ct_owner = THIS_MODULE, 470 470 }; ··· 540 540 .drop_link = nvmet_port_subsys_drop_link, 541 541 }; 542 542 543 - static struct config_item_type nvmet_port_subsys_type = { 543 + static const struct config_item_type nvmet_port_subsys_type = { 544 544 .ct_item_ops = &nvmet_port_subsys_item_ops, 545 545 .ct_owner = THIS_MODULE, 546 546 }; ··· 613 613 .drop_link = nvmet_allowed_hosts_drop_link, 614 614 }; 615 615 616 - static struct config_item_type nvmet_allowed_hosts_type = { 616 + static const struct config_item_type nvmet_allowed_hosts_type = { 617 617 .ct_item_ops = &nvmet_allowed_hosts_item_ops, 618 618 .ct_owner = THIS_MODULE, 619 619 }; ··· 729 729 .release = nvmet_subsys_release, 730 730 }; 731 731 732 - static struct config_item_type nvmet_subsys_type = { 732 + static const struct config_item_type nvmet_subsys_type = { 733 733 .ct_item_ops = &nvmet_subsys_item_ops, 734 734 .ct_attrs = nvmet_subsys_attrs, 735 735 .ct_owner = THIS_MODULE, ··· 767 767 .make_group = nvmet_subsys_make, 768 768 }; 769 769 770 - static struct config_item_type nvmet_subsystems_type = { 770 + static const struct config_item_type nvmet_subsystems_type = { 771 771 .ct_group_ops = &nvmet_subsystems_group_ops, 772 772 .ct_owner = THIS_MODULE, 773 773 }; ··· 827 827 .release = nvmet_referral_release, 828 828 }; 829 829 830 - static struct config_item_type nvmet_referral_type = { 830 + static const struct config_item_type nvmet_referral_type = { 831 831 .ct_owner = THIS_MODULE, 832 832 .ct_attrs = nvmet_referral_attrs, 833 833 .ct_item_ops = &nvmet_referral_item_ops, ··· 852 852 .make_group = nvmet_referral_make, 853 853 }; 854 854 855 - static struct config_item_type nvmet_referrals_type = { 855 + static const struct config_item_type nvmet_referrals_type = { 856 856 .ct_owner = THIS_MODULE, 857 857 .ct_group_ops = &nvmet_referral_group_ops, 858 858 }; ··· 880 880 .release = nvmet_port_release, 881 881 }; 882 882 883 - static struct config_item_type nvmet_port_type = { 883 + static const struct config_item_type nvmet_port_type = { 884 884 .ct_attrs = nvmet_port_attrs, 885 885 .ct_item_ops = &nvmet_port_item_ops, 886 886 .ct_owner = THIS_MODULE, ··· 921 921 .make_group = nvmet_ports_make, 922 922 }; 923 923 924 - static struct config_item_type nvmet_ports_type = { 924 + static const struct config_item_type nvmet_ports_type = { 925 925 .ct_group_ops = &nvmet_ports_group_ops, 926 926 .ct_owner = THIS_MODULE, 927 927 }; ··· 940 940 .release = nvmet_host_release, 941 941 }; 942 942 943 - static struct config_item_type nvmet_host_type = { 943 + static const struct config_item_type nvmet_host_type = { 944 944 .ct_item_ops = &nvmet_host_item_ops, 945 945 .ct_owner = THIS_MODULE, 946 946 }; ··· 963 963 .make_group = nvmet_hosts_make_group, 964 964 }; 965 965 966 - static struct config_item_type nvmet_hosts_type = { 966 + static const struct config_item_type nvmet_hosts_type = { 967 967 .ct_group_ops = &nvmet_hosts_group_ops, 968 968 .ct_owner = THIS_MODULE, 969 969 }; 970 970 971 971 static struct config_group nvmet_hosts_group; 972 972 973 - static struct config_item_type nvmet_root_type = { 973 + static const struct config_item_type nvmet_root_type = { 974 974 .ct_owner = THIS_MODULE, 975 975 }; 976 976
+6 -6
drivers/pci/endpoint/pci-ep-cfs.c
··· 150 150 .drop_link = pci_epc_epf_unlink, 151 151 }; 152 152 153 - static struct config_item_type pci_epc_type = { 153 + static const struct config_item_type pci_epc_type = { 154 154 .ct_item_ops = &pci_epc_item_ops, 155 155 .ct_attrs = pci_epc_attrs, 156 156 .ct_owner = THIS_MODULE, ··· 361 361 .release = pci_epf_release, 362 362 }; 363 363 364 - static struct config_item_type pci_epf_type = { 364 + static const struct config_item_type pci_epf_type = { 365 365 .ct_item_ops = &pci_epf_ops, 366 366 .ct_attrs = pci_epf_attrs, 367 367 .ct_owner = THIS_MODULE, ··· 400 400 .drop_item = &pci_epf_drop, 401 401 }; 402 402 403 - static struct config_item_type pci_epf_group_type = { 403 + static const struct config_item_type pci_epf_group_type = { 404 404 .ct_group_ops = &pci_epf_group_ops, 405 405 .ct_owner = THIS_MODULE, 406 406 }; ··· 428 428 } 429 429 EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); 430 430 431 - static struct config_item_type pci_functions_type = { 431 + static const struct config_item_type pci_functions_type = { 432 432 .ct_owner = THIS_MODULE, 433 433 }; 434 434 435 - static struct config_item_type pci_controllers_type = { 435 + static const struct config_item_type pci_controllers_type = { 436 436 .ct_owner = THIS_MODULE, 437 437 }; 438 438 439 - static struct config_item_type pci_ep_type = { 439 + static const struct config_item_type pci_ep_type = { 440 440 .ct_owner = THIS_MODULE, 441 441 }; 442 442
+6 -6
drivers/target/iscsi/iscsi_target_stat.c
··· 187 187 NULL, 188 188 }; 189 189 190 - struct config_item_type iscsi_stat_instance_cit = { 190 + const struct config_item_type iscsi_stat_instance_cit = { 191 191 .ct_attrs = iscsi_stat_instance_attrs, 192 192 .ct_owner = THIS_MODULE, 193 193 }; ··· 249 249 NULL, 250 250 }; 251 251 252 - struct config_item_type iscsi_stat_sess_err_cit = { 252 + const struct config_item_type iscsi_stat_sess_err_cit = { 253 253 .ct_attrs = iscsi_stat_sess_err_attrs, 254 254 .ct_owner = THIS_MODULE, 255 255 }; ··· 390 390 NULL, 391 391 }; 392 392 393 - struct config_item_type iscsi_stat_tgt_attr_cit = { 393 + const struct config_item_type iscsi_stat_tgt_attr_cit = { 394 394 .ct_attrs = iscsi_stat_tgt_attr_attrs, 395 395 .ct_owner = THIS_MODULE, 396 396 }; ··· 522 522 NULL, 523 523 }; 524 524 525 - struct config_item_type iscsi_stat_login_cit = { 525 + const struct config_item_type iscsi_stat_login_cit = { 526 526 .ct_attrs = iscsi_stat_login_stats_attrs, 527 527 .ct_owner = THIS_MODULE, 528 528 }; ··· 579 579 NULL, 580 580 }; 581 581 582 - struct config_item_type iscsi_stat_logout_cit = { 582 + const struct config_item_type iscsi_stat_logout_cit = { 583 583 .ct_attrs = iscsi_stat_logout_stats_attrs, 584 584 .ct_owner = THIS_MODULE, 585 585 }; ··· 801 801 NULL, 802 802 }; 803 803 804 - struct config_item_type iscsi_stat_sess_cit = { 804 + const struct config_item_type iscsi_stat_sess_cit = { 805 805 .ct_attrs = iscsi_stat_sess_stats_attrs, 806 806 .ct_owner = THIS_MODULE, 807 807 };
+7 -7
drivers/target/target_core_configfs.c
··· 307 307 /* 308 308 * Provides Fabrics Groups and Item Attributes for /sys/kernel/config/target/ 309 309 */ 310 - static struct config_item_type target_core_fabrics_item = { 310 + static const struct config_item_type target_core_fabrics_item = { 311 311 .ct_group_ops = &target_core_fabric_group_ops, 312 312 .ct_attrs = target_core_fabric_item_attrs, 313 313 .ct_owner = THIS_MODULE, ··· 2376 2376 .release = target_core_alua_lu_gp_release, 2377 2377 }; 2378 2378 2379 - static struct config_item_type target_core_alua_lu_gp_cit = { 2379 + static const struct config_item_type target_core_alua_lu_gp_cit = { 2380 2380 .ct_item_ops = &target_core_alua_lu_gp_ops, 2381 2381 .ct_attrs = target_core_alua_lu_gp_attrs, 2382 2382 .ct_owner = THIS_MODULE, ··· 2434 2434 .drop_item = &target_core_alua_drop_lu_gp, 2435 2435 }; 2436 2436 2437 - static struct config_item_type target_core_alua_lu_gps_cit = { 2437 + static const struct config_item_type target_core_alua_lu_gps_cit = { 2438 2438 .ct_item_ops = NULL, 2439 2439 .ct_group_ops = &target_core_alua_lu_gps_group_ops, 2440 2440 .ct_owner = THIS_MODULE, ··· 2813 2813 .release = target_core_alua_tg_pt_gp_release, 2814 2814 }; 2815 2815 2816 - static struct config_item_type target_core_alua_tg_pt_gp_cit = { 2816 + static const struct config_item_type target_core_alua_tg_pt_gp_cit = { 2817 2817 .ct_item_ops = &target_core_alua_tg_pt_gp_ops, 2818 2818 .ct_attrs = target_core_alua_tg_pt_gp_attrs, 2819 2819 .ct_owner = THIS_MODULE, ··· 2884 2884 * core/alua/lu_gps and core/alua/tg_pt_gps that are attached to 2885 2885 * target_core_alua_cit in target_core_init_configfs() below. 2886 2886 */ 2887 - static struct config_item_type target_core_alua_cit = { 2887 + static const struct config_item_type target_core_alua_cit = { 2888 2888 .ct_item_ops = NULL, 2889 2889 .ct_attrs = NULL, 2890 2890 .ct_owner = THIS_MODULE, ··· 3105 3105 .release = target_core_hba_release, 3106 3106 }; 3107 3107 3108 - static struct config_item_type target_core_hba_cit = { 3108 + static const struct config_item_type target_core_hba_cit = { 3109 3109 .ct_item_ops = &target_core_hba_item_ops, 3110 3110 .ct_group_ops = &target_core_hba_group_ops, 3111 3111 .ct_attrs = target_core_hba_attrs, ··· 3188 3188 .drop_item = target_core_call_delhbafromtarget, 3189 3189 }; 3190 3190 3191 - static struct config_item_type target_core_cit = { 3191 + static const struct config_item_type target_core_cit = { 3192 3192 .ct_item_ops = NULL, 3193 3193 .ct_group_ops = &target_core_group_ops, 3194 3194 .ct_attrs = NULL,
+8 -8
drivers/target/target_core_stat.c
··· 96 96 NULL, 97 97 }; 98 98 99 - static struct config_item_type target_stat_scsi_dev_cit = { 99 + static const struct config_item_type target_stat_scsi_dev_cit = { 100 100 .ct_attrs = target_stat_scsi_dev_attrs, 101 101 .ct_owner = THIS_MODULE, 102 102 }; ··· 193 193 NULL, 194 194 }; 195 195 196 - static struct config_item_type target_stat_scsi_tgt_dev_cit = { 196 + static const struct config_item_type target_stat_scsi_tgt_dev_cit = { 197 197 .ct_attrs = target_stat_scsi_tgt_dev_attrs, 198 198 .ct_owner = THIS_MODULE, 199 199 }; ··· 414 414 NULL, 415 415 }; 416 416 417 - static struct config_item_type target_stat_scsi_lu_cit = { 417 + static const struct config_item_type target_stat_scsi_lu_cit = { 418 418 .ct_attrs = target_stat_scsi_lu_attrs, 419 419 .ct_owner = THIS_MODULE, 420 420 }; ··· 540 540 NULL, 541 541 }; 542 542 543 - static struct config_item_type target_stat_scsi_port_cit = { 543 + static const struct config_item_type target_stat_scsi_port_cit = { 544 544 .ct_attrs = target_stat_scsi_port_attrs, 545 545 .ct_owner = THIS_MODULE, 546 546 }; ··· 724 724 NULL, 725 725 }; 726 726 727 - static struct config_item_type target_stat_scsi_tgt_port_cit = { 727 + static const struct config_item_type target_stat_scsi_tgt_port_cit = { 728 728 .ct_attrs = target_stat_scsi_tgt_port_attrs, 729 729 .ct_owner = THIS_MODULE, 730 730 }; ··· 844 844 NULL, 845 845 }; 846 846 847 - static struct config_item_type target_stat_scsi_transport_cit = { 847 + static const struct config_item_type target_stat_scsi_transport_cit = { 848 848 .ct_attrs = target_stat_scsi_transport_attrs, 849 849 .ct_owner = THIS_MODULE, 850 850 }; ··· 1206 1206 NULL, 1207 1207 }; 1208 1208 1209 - static struct config_item_type target_stat_scsi_auth_intr_cit = { 1209 + static const struct config_item_type target_stat_scsi_auth_intr_cit = { 1210 1210 .ct_attrs = target_stat_scsi_auth_intr_attrs, 1211 1211 .ct_owner = THIS_MODULE, 1212 1212 }; ··· 1378 1378 NULL, 1379 1379 }; 1380 1380 1381 - static struct config_item_type target_stat_scsi_att_intr_port_cit = { 1381 + static const struct config_item_type target_stat_scsi_att_intr_port_cit = { 1382 1382 .ct_attrs = target_stat_scsi_ath_intr_port_attrs, 1383 1383 .ct_owner = THIS_MODULE, 1384 1384 };
+5 -5
drivers/usb/gadget/configfs.c
··· 506 506 NULL, 507 507 }; 508 508 509 - static struct config_item_type gadget_config_type = { 509 + static const struct config_item_type gadget_config_type = { 510 510 .ct_item_ops = &gadget_config_item_ops, 511 511 .ct_attrs = gadget_config_attrs, 512 512 .ct_owner = THIS_MODULE, 513 513 }; 514 514 515 - static struct config_item_type gadget_root_type = { 515 + static const struct config_item_type gadget_root_type = { 516 516 .ct_item_ops = &gadget_root_item_ops, 517 517 .ct_attrs = gadget_root_attrs, 518 518 .ct_owner = THIS_MODULE, ··· 594 594 .drop_item = &function_drop, 595 595 }; 596 596 597 - static struct config_item_type functions_type = { 597 + static const struct config_item_type functions_type = { 598 598 .ct_group_ops = &functions_ops, 599 599 .ct_owner = THIS_MODULE, 600 600 }; ··· 695 695 .drop_item = &config_desc_drop, 696 696 }; 697 697 698 - static struct config_item_type config_desc_type = { 698 + static const struct config_item_type config_desc_type = { 699 699 .ct_group_ops = &config_desc_ops, 700 700 .ct_owner = THIS_MODULE, 701 701 }; ··· 1477 1477 .drop_item = &gadgets_drop, 1478 1478 }; 1479 1479 1480 - static struct config_item_type gadgets_type = { 1480 + static const struct config_item_type gadgets_type = { 1481 1481 .ct_group_ops = &gadgets_ops, 1482 1482 .ct_owner = THIS_MODULE, 1483 1483 };
+1 -1
drivers/usb/gadget/function/f_acm.c
··· 783 783 NULL, 784 784 }; 785 785 786 - static struct config_item_type acm_func_type = { 786 + static const struct config_item_type acm_func_type = { 787 787 .ct_item_ops = &acm_item_ops, 788 788 .ct_attrs = acm_attrs, 789 789 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_ecm.c
··· 841 841 NULL, 842 842 }; 843 843 844 - static struct config_item_type ecm_func_type = { 844 + static const struct config_item_type ecm_func_type = { 845 845 .ct_item_ops = &ecm_item_ops, 846 846 .ct_attrs = ecm_attrs, 847 847 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_eem.c
··· 552 552 NULL, 553 553 }; 554 554 555 - static struct config_item_type eem_func_type = { 555 + static const struct config_item_type eem_func_type = { 556 556 .ct_item_ops = &eem_item_ops, 557 557 .ct_attrs = eem_attrs, 558 558 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_fs.c
··· 3381 3381 .release = ffs_attr_release, 3382 3382 }; 3383 3383 3384 - static struct config_item_type ffs_func_type = { 3384 + static const struct config_item_type ffs_func_type = { 3385 3385 .ct_item_ops = &ffs_item_ops, 3386 3386 .ct_owner = THIS_MODULE, 3387 3387 };
+1 -1
drivers/usb/gadget/function/f_hid.c
··· 988 988 NULL, 989 989 }; 990 990 991 - static struct config_item_type hid_func_type = { 991 + static const struct config_item_type hid_func_type = { 992 992 .ct_item_ops = &hidg_item_ops, 993 993 .ct_attrs = hid_attrs, 994 994 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_loopback.c
··· 552 552 NULL, 553 553 }; 554 554 555 - static struct config_item_type lb_func_type = { 555 + static const struct config_item_type lb_func_type = { 556 556 .ct_item_ops = &lb_item_ops, 557 557 .ct_attrs = lb_attrs, 558 558 .ct_owner = THIS_MODULE,
+2 -2
drivers/usb/gadget/function/f_mass_storage.c
··· 3141 3141 NULL, 3142 3142 }; 3143 3143 3144 - static struct config_item_type fsg_lun_type = { 3144 + static const struct config_item_type fsg_lun_type = { 3145 3145 .ct_item_ops = &fsg_lun_item_ops, 3146 3146 .ct_attrs = fsg_lun_attrs, 3147 3147 .ct_owner = THIS_MODULE, ··· 3332 3332 .drop_item = fsg_lun_drop, 3333 3333 }; 3334 3334 3335 - static struct config_item_type fsg_func_type = { 3335 + static const struct config_item_type fsg_func_type = { 3336 3336 .ct_item_ops = &fsg_item_ops, 3337 3337 .ct_group_ops = &fsg_group_ops, 3338 3338 .ct_attrs = fsg_attrs,
+1 -1
drivers/usb/gadget/function/f_midi.c
··· 1188 1188 NULL, 1189 1189 }; 1190 1190 1191 - static struct config_item_type midi_func_type = { 1191 + static const struct config_item_type midi_func_type = { 1192 1192 .ct_item_ops = &midi_item_ops, 1193 1193 .ct_attrs = midi_attrs, 1194 1194 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_ncm.c
··· 1564 1564 NULL, 1565 1565 }; 1566 1566 1567 - static struct config_item_type ncm_func_type = { 1567 + static const struct config_item_type ncm_func_type = { 1568 1568 .ct_item_ops = &ncm_item_ops, 1569 1569 .ct_attrs = ncm_attrs, 1570 1570 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_obex.c
··· 407 407 NULL, 408 408 }; 409 409 410 - static struct config_item_type obex_func_type = { 410 + static const struct config_item_type obex_func_type = { 411 411 .ct_item_ops = &obex_item_ops, 412 412 .ct_attrs = acm_attrs, 413 413 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_phonet.c
··· 598 598 NULL, 599 599 }; 600 600 601 - static struct config_item_type phonet_func_type = { 601 + static const struct config_item_type phonet_func_type = { 602 602 .ct_item_ops = &phonet_item_ops, 603 603 .ct_attrs = phonet_attrs, 604 604 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_printer.c
··· 1257 1257 NULL, 1258 1258 }; 1259 1259 1260 - static struct config_item_type printer_func_type = { 1260 + static const struct config_item_type printer_func_type = { 1261 1261 .ct_item_ops = &printer_item_ops, 1262 1262 .ct_attrs = printer_attrs, 1263 1263 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_rndis.c
··· 886 886 NULL, 887 887 }; 888 888 889 - static struct config_item_type rndis_func_type = { 889 + static const struct config_item_type rndis_func_type = { 890 890 .ct_item_ops = &rndis_item_ops, 891 891 .ct_attrs = rndis_attrs, 892 892 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_serial.c
··· 278 278 NULL, 279 279 }; 280 280 281 - static struct config_item_type serial_func_type = { 281 + static const struct config_item_type serial_func_type = { 282 282 .ct_item_ops = &serial_item_ops, 283 283 .ct_attrs = acm_attrs, 284 284 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_sourcesink.c
··· 1226 1226 NULL, 1227 1227 }; 1228 1228 1229 - static struct config_item_type ss_func_type = { 1229 + static const struct config_item_type ss_func_type = { 1230 1230 .ct_item_ops = &ss_item_ops, 1231 1231 .ct_attrs = ss_attrs, 1232 1232 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_subset.c
··· 408 408 NULL, 409 409 }; 410 410 411 - static struct config_item_type gether_func_type = { 411 + static const struct config_item_type gether_func_type = { 412 412 .ct_item_ops = &gether_item_ops, 413 413 .ct_attrs = gether_attrs, 414 414 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_tcm.c
··· 2167 2167 .release = tcm_attr_release, 2168 2168 }; 2169 2169 2170 - static struct config_item_type tcm_func_type = { 2170 + static const struct config_item_type tcm_func_type = { 2171 2171 .ct_item_ops = &tcm_item_ops, 2172 2172 .ct_owner = THIS_MODULE, 2173 2173 };
+1 -1
drivers/usb/gadget/function/f_uac1.c
··· 705 705 NULL, 706 706 }; 707 707 708 - static struct config_item_type f_uac1_func_type = { 708 + static const struct config_item_type f_uac1_func_type = { 709 709 .ct_item_ops = &f_uac1_item_ops, 710 710 .ct_attrs = f_uac1_attrs, 711 711 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_uac1_legacy.c
··· 920 920 NULL, 921 921 }; 922 922 923 - static struct config_item_type f_uac1_func_type = { 923 + static const struct config_item_type f_uac1_func_type = { 924 924 .ct_item_ops = &f_uac1_item_ops, 925 925 .ct_attrs = f_uac1_attrs, 926 926 .ct_owner = THIS_MODULE,
+1 -1
drivers/usb/gadget/function/f_uac2.c
··· 917 917 NULL, 918 918 }; 919 919 920 - static struct config_item_type f_uac2_func_type = { 920 + static const struct config_item_type f_uac2_func_type = { 921 921 .ct_item_ops = &f_uac2_item_ops, 922 922 .ct_attrs = f_uac2_attrs, 923 923 .ct_owner = THIS_MODULE,
+25 -25
drivers/usb/gadget/function/uvc_configfs.c
··· 124 124 NULL, 125 125 }; 126 126 127 - static struct config_item_type uvcg_control_header_type = { 127 + static const struct config_item_type uvcg_control_header_type = { 128 128 .ct_attrs = uvcg_control_header_attrs, 129 129 .ct_owner = THIS_MODULE, 130 130 }; ··· 167 167 .drop_item = uvcg_control_header_drop, 168 168 }; 169 169 170 - static struct config_item_type uvcg_control_header_grp_type = { 170 + static const struct config_item_type uvcg_control_header_grp_type = { 171 171 .ct_group_ops = &uvcg_control_header_grp_ops, 172 172 .ct_owner = THIS_MODULE, 173 173 }; ··· 262 262 NULL, 263 263 }; 264 264 265 - static struct config_item_type uvcg_default_processing_type = { 265 + static const struct config_item_type uvcg_default_processing_type = { 266 266 .ct_attrs = uvcg_default_processing_attrs, 267 267 .ct_owner = THIS_MODULE, 268 268 }; ··· 274 274 struct config_group group; 275 275 } uvcg_processing_grp; 276 276 277 - static struct config_item_type uvcg_processing_grp_type = { 277 + static const struct config_item_type uvcg_processing_grp_type = { 278 278 .ct_owner = THIS_MODULE, 279 279 }; 280 280 ··· 379 379 NULL, 380 380 }; 381 381 382 - static struct config_item_type uvcg_default_camera_type = { 382 + static const struct config_item_type uvcg_default_camera_type = { 383 383 .ct_attrs = uvcg_default_camera_attrs, 384 384 .ct_owner = THIS_MODULE, 385 385 }; ··· 391 391 struct config_group group; 392 392 } uvcg_camera_grp; 393 393 394 - static struct config_item_type uvcg_camera_grp_type = { 394 + static const struct config_item_type uvcg_camera_grp_type = { 395 395 .ct_owner = THIS_MODULE, 396 396 }; 397 397 ··· 457 457 NULL, 458 458 }; 459 459 460 - static struct config_item_type uvcg_default_output_type = { 460 + static const struct config_item_type uvcg_default_output_type = { 461 461 .ct_attrs = uvcg_default_output_attrs, 462 462 .ct_owner = THIS_MODULE, 463 463 }; ··· 469 469 struct config_group group; 470 470 } uvcg_output_grp; 471 471 472 - static struct config_item_type uvcg_output_grp_type = { 472 + static const struct config_item_type uvcg_output_grp_type = { 473 473 .ct_owner = THIS_MODULE, 474 474 }; 475 475 ··· 478 478 struct config_group group; 479 479 } uvcg_terminal_grp; 480 480 481 - static struct config_item_type uvcg_terminal_grp_type = { 481 + static const struct config_item_type uvcg_terminal_grp_type = { 482 482 .ct_owner = THIS_MODULE, 483 483 }; 484 484 ··· 583 583 .drop_link = uvcg_control_class_drop_link, 584 584 }; 585 585 586 - static struct config_item_type uvcg_control_class_type = { 586 + static const struct config_item_type uvcg_control_class_type = { 587 587 .ct_item_ops = &uvcg_control_class_item_ops, 588 588 .ct_owner = THIS_MODULE, 589 589 }; ··· 593 593 struct config_group group; 594 594 } uvcg_control_class_grp; 595 595 596 - static struct config_item_type uvcg_control_class_grp_type = { 596 + static const struct config_item_type uvcg_control_class_grp_type = { 597 597 .ct_owner = THIS_MODULE, 598 598 }; 599 599 ··· 602 602 struct config_group group; 603 603 } uvcg_control_grp; 604 604 605 - static struct config_item_type uvcg_control_grp_type = { 605 + static const struct config_item_type uvcg_control_grp_type = { 606 606 .ct_owner = THIS_MODULE, 607 607 }; 608 608 ··· 854 854 NULL, 855 855 }; 856 856 857 - static struct config_item_type uvcg_streaming_header_type = { 857 + static const struct config_item_type uvcg_streaming_header_type = { 858 858 .ct_item_ops = &uvcg_streaming_header_item_ops, 859 859 .ct_attrs = uvcg_streaming_header_attrs, 860 860 .ct_owner = THIS_MODULE, ··· 898 898 .drop_item = uvcg_streaming_header_drop, 899 899 }; 900 900 901 - static struct config_item_type uvcg_streaming_header_grp_type = { 901 + static const struct config_item_type uvcg_streaming_header_grp_type = { 902 902 .ct_group_ops = &uvcg_streaming_header_grp_ops, 903 903 .ct_owner = THIS_MODULE, 904 904 }; ··· 1147 1147 NULL, 1148 1148 }; 1149 1149 1150 - static struct config_item_type uvcg_frame_type = { 1150 + static const struct config_item_type uvcg_frame_type = { 1151 1151 .ct_attrs = uvcg_frame_attrs, 1152 1152 .ct_owner = THIS_MODULE, 1153 1153 }; ··· 1416 1416 NULL, 1417 1417 }; 1418 1418 1419 - static struct config_item_type uvcg_uncompressed_type = { 1419 + static const struct config_item_type uvcg_uncompressed_type = { 1420 1420 .ct_group_ops = &uvcg_uncompressed_group_ops, 1421 1421 .ct_attrs = uvcg_uncompressed_attrs, 1422 1422 .ct_owner = THIS_MODULE, ··· 1466 1466 .drop_item = uvcg_uncompressed_drop, 1467 1467 }; 1468 1468 1469 - static struct config_item_type uvcg_uncompressed_grp_type = { 1469 + static const struct config_item_type uvcg_uncompressed_grp_type = { 1470 1470 .ct_group_ops = &uvcg_uncompressed_grp_ops, 1471 1471 .ct_owner = THIS_MODULE, 1472 1472 }; ··· 1616 1616 NULL, 1617 1617 }; 1618 1618 1619 - static struct config_item_type uvcg_mjpeg_type = { 1619 + static const struct config_item_type uvcg_mjpeg_type = { 1620 1620 .ct_group_ops = &uvcg_mjpeg_group_ops, 1621 1621 .ct_attrs = uvcg_mjpeg_attrs, 1622 1622 .ct_owner = THIS_MODULE, ··· 1660 1660 .drop_item = uvcg_mjpeg_drop, 1661 1661 }; 1662 1662 1663 - static struct config_item_type uvcg_mjpeg_grp_type = { 1663 + static const struct config_item_type uvcg_mjpeg_grp_type = { 1664 1664 .ct_group_ops = &uvcg_mjpeg_grp_ops, 1665 1665 .ct_owner = THIS_MODULE, 1666 1666 }; ··· 1725 1725 NULL, 1726 1726 }; 1727 1727 1728 - static struct config_item_type uvcg_default_color_matching_type = { 1728 + static const struct config_item_type uvcg_default_color_matching_type = { 1729 1729 .ct_attrs = uvcg_default_color_matching_attrs, 1730 1730 .ct_owner = THIS_MODULE, 1731 1731 }; ··· 1737 1737 struct config_group group; 1738 1738 } uvcg_color_matching_grp; 1739 1739 1740 - static struct config_item_type uvcg_color_matching_grp_type = { 1740 + static const struct config_item_type uvcg_color_matching_grp_type = { 1741 1741 .ct_owner = THIS_MODULE, 1742 1742 }; 1743 1743 ··· 2082 2082 .drop_link = uvcg_streaming_class_drop_link, 2083 2083 }; 2084 2084 2085 - static struct config_item_type uvcg_streaming_class_type = { 2085 + static const struct config_item_type uvcg_streaming_class_type = { 2086 2086 .ct_item_ops = &uvcg_streaming_class_item_ops, 2087 2087 .ct_owner = THIS_MODULE, 2088 2088 }; ··· 2092 2092 struct config_group group; 2093 2093 } uvcg_streaming_class_grp; 2094 2094 2095 - static struct config_item_type uvcg_streaming_class_grp_type = { 2095 + static const struct config_item_type uvcg_streaming_class_grp_type = { 2096 2096 .ct_owner = THIS_MODULE, 2097 2097 }; 2098 2098 ··· 2101 2101 struct config_group group; 2102 2102 } uvcg_streaming_grp; 2103 2103 2104 - static struct config_item_type uvcg_streaming_grp_type = { 2104 + static const struct config_item_type uvcg_streaming_grp_type = { 2105 2105 .ct_owner = THIS_MODULE, 2106 2106 }; 2107 2107 ··· 2187 2187 NULL, 2188 2188 }; 2189 2189 2190 - static struct config_item_type uvc_func_type = { 2190 + static const struct config_item_type uvc_func_type = { 2191 2191 .ct_item_ops = &uvc_item_ops, 2192 2192 .ct_attrs = uvc_attrs, 2193 2193 .ct_owner = THIS_MODULE,
+5 -5
fs/configfs/dir.c
··· 584 584 585 585 static int populate_attrs(struct config_item *item) 586 586 { 587 - struct config_item_type *t = item->ci_type; 587 + const struct config_item_type *t = item->ci_type; 588 588 struct configfs_attribute *attr; 589 589 struct configfs_bin_attribute *bin_attr; 590 590 int error = 0; ··· 901 901 static void client_disconnect_notify(struct config_item *parent_item, 902 902 struct config_item *item) 903 903 { 904 - struct config_item_type *type; 904 + const struct config_item_type *type; 905 905 906 906 type = parent_item->ci_type; 907 907 BUG_ON(!type); ··· 920 920 static void client_drop_item(struct config_item *parent_item, 921 921 struct config_item *item) 922 922 { 923 - struct config_item_type *type; 923 + const struct config_item_type *type; 924 924 925 925 type = parent_item->ci_type; 926 926 BUG_ON(!type); ··· 1260 1260 struct config_item *parent_item; 1261 1261 struct configfs_subsystem *subsys; 1262 1262 struct configfs_dirent *sd; 1263 - struct config_item_type *type; 1263 + const struct config_item_type *type; 1264 1264 struct module *subsys_owner = NULL, *new_item_owner = NULL; 1265 1265 char *name; 1266 1266 ··· 1810 1810 struct config_group * 1811 1811 configfs_register_default_group(struct config_group *parent_group, 1812 1812 const char *name, 1813 - struct config_item_type *item_type) 1813 + const struct config_item_type *item_type) 1814 1814 { 1815 1815 int ret; 1816 1816 struct config_group *group;
+6 -6
fs/configfs/file.c
··· 166 166 retval = -ETXTBSY; 167 167 goto out; 168 168 } 169 - buffer->read_in_progress = 1; 169 + buffer->read_in_progress = true; 170 170 171 171 if (buffer->needs_read_fill) { 172 172 /* perform first read with buf == NULL to get extent */ ··· 325 325 len = -ETXTBSY; 326 326 goto out; 327 327 } 328 - buffer->write_in_progress = 1; 328 + buffer->write_in_progress = true; 329 329 330 330 /* buffer grows? */ 331 331 if (*ppos + count > buffer->bin_buffer_size) { ··· 429 429 } 430 430 mutex_init(&buffer->mutex); 431 431 buffer->needs_read_fill = 1; 432 - buffer->read_in_progress = 0; 433 - buffer->write_in_progress = 0; 432 + buffer->read_in_progress = false; 433 + buffer->write_in_progress = false; 434 434 buffer->ops = ops; 435 435 file->private_data = buffer; 436 436 goto Done; ··· 488 488 ssize_t len = 0; 489 489 int ret; 490 490 491 - buffer->read_in_progress = 0; 491 + buffer->read_in_progress = false; 492 492 493 493 if (buffer->write_in_progress) { 494 - buffer->write_in_progress = 0; 494 + buffer->write_in_progress = false; 495 495 496 496 len = bin_attr->write(item, buffer->bin_buffer, 497 497 buffer->bin_buffer_size);
+3 -3
fs/configfs/item.c
··· 113 113 114 114 void config_item_init_type_name(struct config_item *item, 115 115 const char *name, 116 - struct config_item_type *type) 116 + const struct config_item_type *type) 117 117 { 118 118 config_item_set_name(item, "%s", name); 119 119 item->ci_type = type; ··· 122 122 EXPORT_SYMBOL(config_item_init_type_name); 123 123 124 124 void config_group_init_type_name(struct config_group *group, const char *name, 125 - struct config_item_type *type) 125 + const struct config_item_type *type) 126 126 { 127 127 config_item_set_name(&group->cg_item, "%s", name); 128 128 group->cg_item.ci_type = type; ··· 148 148 149 149 static void config_item_cleanup(struct config_item *item) 150 150 { 151 - struct config_item_type *t = item->ci_type; 151 + const struct config_item_type *t = item->ci_type; 152 152 struct config_group *s = item->ci_group; 153 153 struct config_item *parent = item->ci_parent; 154 154
+2 -2
fs/configfs/symlink.c
··· 138 138 struct configfs_dirent *sd; 139 139 struct config_item *parent_item; 140 140 struct config_item *target_item = NULL; 141 - struct config_item_type *type; 141 + const struct config_item_type *type; 142 142 143 143 sd = dentry->d_parent->d_fsdata; 144 144 /* ··· 186 186 struct configfs_dirent *sd = dentry->d_fsdata; 187 187 struct configfs_symlink *sl; 188 188 struct config_item *parent_item; 189 - struct config_item_type *type; 189 + const struct config_item_type *type; 190 190 int ret; 191 191 192 192 ret = -EPERM; /* What lack-of-symlink returns */
+8 -8
fs/dlm/config.c
··· 282 282 .release = release_node, 283 283 }; 284 284 285 - static struct config_item_type clusters_type = { 285 + static const struct config_item_type clusters_type = { 286 286 .ct_group_ops = &clusters_ops, 287 287 .ct_owner = THIS_MODULE, 288 288 }; 289 289 290 - static struct config_item_type cluster_type = { 290 + static const struct config_item_type cluster_type = { 291 291 .ct_item_ops = &cluster_ops, 292 292 .ct_attrs = cluster_attrs, 293 293 .ct_owner = THIS_MODULE, 294 294 }; 295 295 296 - static struct config_item_type spaces_type = { 296 + static const struct config_item_type spaces_type = { 297 297 .ct_group_ops = &spaces_ops, 298 298 .ct_owner = THIS_MODULE, 299 299 }; 300 300 301 - static struct config_item_type space_type = { 301 + static const struct config_item_type space_type = { 302 302 .ct_item_ops = &space_ops, 303 303 .ct_owner = THIS_MODULE, 304 304 }; 305 305 306 - static struct config_item_type comms_type = { 306 + static const struct config_item_type comms_type = { 307 307 .ct_group_ops = &comms_ops, 308 308 .ct_owner = THIS_MODULE, 309 309 }; 310 310 311 - static struct config_item_type comm_type = { 311 + static const struct config_item_type comm_type = { 312 312 .ct_item_ops = &comm_ops, 313 313 .ct_attrs = comm_attrs, 314 314 .ct_owner = THIS_MODULE, 315 315 }; 316 316 317 - static struct config_item_type nodes_type = { 317 + static const struct config_item_type nodes_type = { 318 318 .ct_group_ops = &nodes_ops, 319 319 .ct_owner = THIS_MODULE, 320 320 }; 321 321 322 - static struct config_item_type node_type = { 322 + static const struct config_item_type node_type = { 323 323 .ct_item_ops = &node_ops, 324 324 .ct_attrs = node_attrs, 325 325 .ct_owner = THIS_MODULE,
+2 -2
fs/ocfs2/cluster/heartbeat.c
··· 2025 2025 .release = o2hb_region_release, 2026 2026 }; 2027 2027 2028 - static struct config_item_type o2hb_region_type = { 2028 + static const struct config_item_type o2hb_region_type = { 2029 2029 .ct_item_ops = &o2hb_region_item_ops, 2030 2030 .ct_attrs = o2hb_region_attrs, 2031 2031 .ct_owner = THIS_MODULE, ··· 2310 2310 .drop_item = o2hb_heartbeat_group_drop_item, 2311 2311 }; 2312 2312 2313 - static struct config_item_type o2hb_heartbeat_group_type = { 2313 + static const struct config_item_type o2hb_heartbeat_group_type = { 2314 2314 .ct_group_ops = &o2hb_heartbeat_group_group_ops, 2315 2315 .ct_attrs = o2hb_heartbeat_group_attrs, 2316 2316 .ct_owner = THIS_MODULE,
+4 -4
fs/ocfs2/cluster/nodemanager.c
··· 378 378 .release = o2nm_node_release, 379 379 }; 380 380 381 - static struct config_item_type o2nm_node_type = { 381 + static const struct config_item_type o2nm_node_type = { 382 382 .ct_item_ops = &o2nm_node_item_ops, 383 383 .ct_attrs = o2nm_node_attrs, 384 384 .ct_owner = THIS_MODULE, ··· 619 619 .drop_item = o2nm_node_group_drop_item, 620 620 }; 621 621 622 - static struct config_item_type o2nm_node_group_type = { 622 + static const struct config_item_type o2nm_node_group_type = { 623 623 .ct_group_ops = &o2nm_node_group_group_ops, 624 624 .ct_owner = THIS_MODULE, 625 625 }; ··· 637 637 .release = o2nm_cluster_release, 638 638 }; 639 639 640 - static struct config_item_type o2nm_cluster_type = { 640 + static const struct config_item_type o2nm_cluster_type = { 641 641 .ct_item_ops = &o2nm_cluster_item_ops, 642 642 .ct_attrs = o2nm_cluster_attrs, 643 643 .ct_owner = THIS_MODULE, ··· 722 722 .drop_item = o2nm_cluster_group_drop_item, 723 723 }; 724 724 725 - static struct config_item_type o2nm_cluster_group_type = { 725 + static const struct config_item_type o2nm_cluster_group_type = { 726 726 .ct_group_ops = &o2nm_cluster_group_group_ops, 727 727 .ct_owner = THIS_MODULE, 728 728 };
+4 -4
include/linux/configfs.h
··· 58 58 struct list_head ci_entry; 59 59 struct config_item *ci_parent; 60 60 struct config_group *ci_group; 61 - struct config_item_type *ci_type; 61 + const struct config_item_type *ci_type; 62 62 struct dentry *ci_dentry; 63 63 }; 64 64 ··· 72 72 73 73 extern void config_item_init_type_name(struct config_item *item, 74 74 const char *name, 75 - struct config_item_type *type); 75 + const struct config_item_type *type); 76 76 77 77 extern struct config_item *config_item_get(struct config_item *); 78 78 extern struct config_item *config_item_get_unless_zero(struct config_item *); ··· 101 101 extern void config_group_init(struct config_group *group); 102 102 extern void config_group_init_type_name(struct config_group *group, 103 103 const char *name, 104 - struct config_item_type *type); 104 + const struct config_item_type *type); 105 105 106 106 static inline struct config_group *to_config_group(struct config_item *item) 107 107 { ··· 261 261 struct config_group * 262 262 configfs_register_default_group(struct config_group *parent_group, 263 263 const char *name, 264 - struct config_item_type *item_type); 264 + const struct config_item_type *item_type); 265 265 void configfs_unregister_default_group(struct config_group *group); 266 266 267 267 /* These functions can sleep and can alloc with GFP_KERNEL */
+1 -1
include/linux/iio/sw_device.h
··· 60 60 static inline 61 61 void iio_swd_group_init_type_name(struct iio_sw_device *d, 62 62 const char *name, 63 - struct config_item_type *type) 63 + const struct config_item_type *type) 64 64 { 65 65 #if IS_ENABLED(CONFIG_CONFIGFS_FS) 66 66 config_group_init_type_name(&d->group, name, type);
+1 -1
include/linux/iio/sw_trigger.h
··· 60 60 static inline 61 61 void iio_swt_group_init_type_name(struct iio_sw_trigger *t, 62 62 const char *name, 63 - struct config_item_type *type) 63 + const struct config_item_type *type) 64 64 { 65 65 #if IS_ENABLED(CONFIG_CONFIGFS_FS) 66 66 config_group_init_type_name(&t->group, name, type);
+6 -6
include/target/iscsi/iscsi_target_stat.h
··· 9 9 /* 10 10 * For struct iscsi_tiqn->tiqn_wwn default groups 11 11 */ 12 - extern struct config_item_type iscsi_stat_instance_cit; 13 - extern struct config_item_type iscsi_stat_sess_err_cit; 14 - extern struct config_item_type iscsi_stat_tgt_attr_cit; 15 - extern struct config_item_type iscsi_stat_login_cit; 16 - extern struct config_item_type iscsi_stat_logout_cit; 12 + extern const struct config_item_type iscsi_stat_instance_cit; 13 + extern const struct config_item_type iscsi_stat_sess_err_cit; 14 + extern const struct config_item_type iscsi_stat_tgt_attr_cit; 15 + extern const struct config_item_type iscsi_stat_login_cit; 16 + extern const struct config_item_type iscsi_stat_logout_cit; 17 17 18 18 /* 19 19 * For struct iscsi_session->se_sess default groups 20 20 */ 21 - extern struct config_item_type iscsi_stat_sess_cit; 21 + extern const struct config_item_type iscsi_stat_sess_cit; 22 22 23 23 /* iSCSI session error types */ 24 24 #define ISCSI_SESS_ERR_UNKNOWN 0
+4 -4
samples/configfs/configfs_sample.c
··· 115 115 NULL, 116 116 }; 117 117 118 - static struct config_item_type childless_type = { 118 + static const struct config_item_type childless_type = { 119 119 .ct_attrs = childless_attrs, 120 120 .ct_owner = THIS_MODULE, 121 121 }; ··· 193 193 .release = simple_child_release, 194 194 }; 195 195 196 - static struct config_item_type simple_child_type = { 196 + static const struct config_item_type simple_child_type = { 197 197 .ct_item_ops = &simple_child_item_ops, 198 198 .ct_attrs = simple_child_attrs, 199 199 .ct_owner = THIS_MODULE, ··· 261 261 .make_item = simple_children_make_item, 262 262 }; 263 263 264 - static struct config_item_type simple_children_type = { 264 + static const struct config_item_type simple_children_type = { 265 265 .ct_item_ops = &simple_children_item_ops, 266 266 .ct_group_ops = &simple_children_group_ops, 267 267 .ct_attrs = simple_children_attrs, ··· 331 331 .make_group = group_children_make_group, 332 332 }; 333 333 334 - static struct config_item_type group_children_type = { 334 + static const struct config_item_type group_children_type = { 335 335 .ct_group_ops = &group_children_group_ops, 336 336 .ct_attrs = group_children_attrs, 337 337 .ct_owner = THIS_MODULE,