Skip to content

Commit

Permalink
Merge tag 'configfs-for-4.15' of git://git.infradead.org/users/hch/co…
Browse files Browse the repository at this point in the history
…nfigfs

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
  • Loading branch information
torvalds committed Nov 14, 2017
2 parents f14fc0c + 6ace4f6 commit abc36be
Show file tree
Hide file tree
Showing 50 changed files with 165 additions and 165 deletions.
6 changes: 3 additions & 3 deletions drivers/acpi/acpi_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ struct configfs_attribute *acpi_table_attrs[] = {
NULL,
};

static struct config_item_type acpi_table_type = {
static const struct config_item_type acpi_table_type = {
.ct_owner = THIS_MODULE,
.ct_bin_attrs = acpi_table_bin_attrs,
.ct_attrs = acpi_table_attrs,
Expand Down Expand Up @@ -237,12 +237,12 @@ struct configfs_group_operations acpi_table_group_ops = {
.drop_item = acpi_table_drop_item,
};

static struct config_item_type acpi_tables_type = {
static const struct config_item_type acpi_tables_type = {
.ct_owner = THIS_MODULE,
.ct_group_ops = &acpi_table_group_ops,
};

static struct config_item_type acpi_root_group_type = {
static const struct config_item_type acpi_root_group_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
4 changes: 2 additions & 2 deletions drivers/block/null_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ static struct configfs_item_operations nullb_device_ops = {
.release = nullb_device_release,
};

static struct config_item_type nullb_device_type = {
static const struct config_item_type nullb_device_type = {
.ct_item_ops = &nullb_device_ops,
.ct_attrs = nullb_device_attrs,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -528,7 +528,7 @@ static struct configfs_group_operations nullb_group_ops = {
.drop_item = nullb_group_drop_item,
};

static struct config_item_type nullb_group_type = {
static const struct config_item_type nullb_group_type = {
.ct_group_ops = &nullb_group_ops,
.ct_attrs = nullb_group_attrs,
.ct_owner = THIS_MODULE,
Expand Down
10 changes: 5 additions & 5 deletions drivers/hwtracing/stm/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ static struct configfs_attribute *stp_policy_node_attrs[] = {
NULL,
};

static struct config_item_type stp_policy_type;
static struct config_item_type stp_policy_node_type;
static const struct config_item_type stp_policy_type;
static const struct config_item_type stp_policy_node_type;

static struct config_group *
stp_policy_node_make(struct config_group *group, const char *name)
Expand Down Expand Up @@ -236,7 +236,7 @@ static struct configfs_group_operations stp_policy_node_group_ops = {
.drop_item = stp_policy_node_drop,
};

static struct config_item_type stp_policy_node_type = {
static const struct config_item_type stp_policy_node_type = {
.ct_item_ops = &stp_policy_node_item_ops,
.ct_group_ops = &stp_policy_node_group_ops,
.ct_attrs = stp_policy_node_attrs,
Expand Down Expand Up @@ -311,7 +311,7 @@ static struct configfs_group_operations stp_policy_group_ops = {
.make_group = stp_policy_node_make,
};

static struct config_item_type stp_policy_type = {
static const struct config_item_type stp_policy_type = {
.ct_item_ops = &stp_policy_item_ops,
.ct_group_ops = &stp_policy_group_ops,
.ct_attrs = stp_policy_attrs,
Expand Down Expand Up @@ -380,7 +380,7 @@ static struct configfs_group_operations stp_policies_group_ops = {
.make_group = stp_policies_make,
};

static struct config_item_type stp_policies_type = {
static const struct config_item_type stp_policies_type = {
.ct_group_ops = &stp_policies_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/dummy/iio_simple_dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <linux/iio/sw_device.h>
#include "iio_simple_dummy.h"

static struct config_item_type iio_dummy_type = {
static const struct config_item_type iio_dummy_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/industrialio-configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/configfs.h>

static struct config_item_type iio_root_group_type = {
static const struct config_item_type iio_root_group_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
6 changes: 3 additions & 3 deletions drivers/iio/industrialio-sw-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <linux/configfs.h>

static struct config_group *iio_devices_group;
static struct config_item_type iio_device_type_group_type;
static const struct config_item_type iio_device_type_group_type;

static struct config_item_type iio_devices_group_type = {
static const struct config_item_type iio_devices_group_type = {
.ct_owner = THIS_MODULE,
};

Expand Down Expand Up @@ -156,7 +156,7 @@ static struct configfs_group_operations device_ops = {
.drop_item = &device_drop_group,
};

static struct config_item_type iio_device_type_group_type = {
static const struct config_item_type iio_device_type_group_type = {
.ct_group_ops = &device_ops,
.ct_owner = THIS_MODULE,
};
Expand Down
6 changes: 3 additions & 3 deletions drivers/iio/industrialio-sw-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <linux/configfs.h>

static struct config_group *iio_triggers_group;
static struct config_item_type iio_trigger_type_group_type;
static const struct config_item_type iio_trigger_type_group_type;

static struct config_item_type iio_triggers_group_type = {
static const struct config_item_type iio_triggers_group_type = {
.ct_owner = THIS_MODULE,
};

Expand Down Expand Up @@ -156,7 +156,7 @@ static struct configfs_group_operations trigger_ops = {
.drop_item = &trigger_drop_group,
};

static struct config_item_type iio_trigger_type_group_type = {
static const struct config_item_type iio_trigger_type_group_type = {
.ct_group_ops = &trigger_ops,
.ct_owner = THIS_MODULE,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/trigger/iio-trig-hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct iio_hrtimer_info {
ktime_t period;
};

static struct config_item_type iio_hrtimer_type = {
static const struct config_item_type iio_hrtimer_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/iio/trigger/iio-trig-loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct iio_loop_info {
struct task_struct *task;
};

static struct config_item_type iio_loop_type = {
static const struct config_item_type iio_loop_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
8 changes: 4 additions & 4 deletions drivers/infiniband/core/cma_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static struct configfs_attribute *cma_configfs_attributes[] = {
NULL,
};

static struct config_item_type cma_port_group_type = {
static const struct config_item_type cma_port_group_type = {
.ct_attrs = cma_configfs_attributes,
.ct_owner = THIS_MODULE
};
Expand Down Expand Up @@ -263,7 +263,7 @@ static struct configfs_item_operations cma_ports_item_ops = {
.release = release_cma_ports_group
};

static struct config_item_type cma_ports_group_type = {
static const struct config_item_type cma_ports_group_type = {
.ct_item_ops = &cma_ports_item_ops,
.ct_owner = THIS_MODULE
};
Expand All @@ -272,7 +272,7 @@ static struct configfs_item_operations cma_device_item_ops = {
.release = release_cma_dev
};

static struct config_item_type cma_device_group_type = {
static const struct config_item_type cma_device_group_type = {
.ct_item_ops = &cma_device_item_ops,
.ct_owner = THIS_MODULE
};
Expand Down Expand Up @@ -323,7 +323,7 @@ static struct configfs_group_operations cma_subsys_group_ops = {
.make_group = make_cma_dev,
};

static struct config_item_type cma_subsys_type = {
static const struct config_item_type cma_subsys_type = {
.ct_group_ops = &cma_subsys_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/netconsole.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static struct configfs_item_operations netconsole_target_item_ops = {
.release = netconsole_target_release,
};

static struct config_item_type netconsole_target_type = {
static const struct config_item_type netconsole_target_type = {
.ct_attrs = netconsole_target_attrs,
.ct_item_ops = &netconsole_target_item_ops,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -682,7 +682,7 @@ static struct configfs_group_operations netconsole_subsys_group_ops = {
.drop_item = drop_netconsole_target,
};

static struct config_item_type netconsole_subsys_type = {
static const struct config_item_type netconsole_subsys_type = {
.ct_group_ops = &netconsole_subsys_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down
30 changes: 15 additions & 15 deletions drivers/nvme/target/configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

#include "nvmet.h"

static struct config_item_type nvmet_host_type;
static struct config_item_type nvmet_subsys_type;
static const struct config_item_type nvmet_host_type;
static const struct config_item_type nvmet_subsys_type;

/*
* nvmet_port Generic ConfigFS definitions.
Expand Down Expand Up @@ -425,7 +425,7 @@ static struct configfs_item_operations nvmet_ns_item_ops = {
.release = nvmet_ns_release,
};

static struct config_item_type nvmet_ns_type = {
static const struct config_item_type nvmet_ns_type = {
.ct_item_ops = &nvmet_ns_item_ops,
.ct_attrs = nvmet_ns_attrs,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -464,7 +464,7 @@ static struct configfs_group_operations nvmet_namespaces_group_ops = {
.make_group = nvmet_ns_make,
};

static struct config_item_type nvmet_namespaces_type = {
static const struct config_item_type nvmet_namespaces_type = {
.ct_group_ops = &nvmet_namespaces_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down Expand Up @@ -540,7 +540,7 @@ static struct configfs_item_operations nvmet_port_subsys_item_ops = {
.drop_link = nvmet_port_subsys_drop_link,
};

static struct config_item_type nvmet_port_subsys_type = {
static const struct config_item_type nvmet_port_subsys_type = {
.ct_item_ops = &nvmet_port_subsys_item_ops,
.ct_owner = THIS_MODULE,
};
Expand Down Expand Up @@ -613,7 +613,7 @@ static struct configfs_item_operations nvmet_allowed_hosts_item_ops = {
.drop_link = nvmet_allowed_hosts_drop_link,
};

static struct config_item_type nvmet_allowed_hosts_type = {
static const struct config_item_type nvmet_allowed_hosts_type = {
.ct_item_ops = &nvmet_allowed_hosts_item_ops,
.ct_owner = THIS_MODULE,
};
Expand Down Expand Up @@ -729,7 +729,7 @@ static struct configfs_item_operations nvmet_subsys_item_ops = {
.release = nvmet_subsys_release,
};

static struct config_item_type nvmet_subsys_type = {
static const struct config_item_type nvmet_subsys_type = {
.ct_item_ops = &nvmet_subsys_item_ops,
.ct_attrs = nvmet_subsys_attrs,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -767,7 +767,7 @@ static struct configfs_group_operations nvmet_subsystems_group_ops = {
.make_group = nvmet_subsys_make,
};

static struct config_item_type nvmet_subsystems_type = {
static const struct config_item_type nvmet_subsystems_type = {
.ct_group_ops = &nvmet_subsystems_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down Expand Up @@ -827,7 +827,7 @@ static struct configfs_item_operations nvmet_referral_item_ops = {
.release = nvmet_referral_release,
};

static struct config_item_type nvmet_referral_type = {
static const struct config_item_type nvmet_referral_type = {
.ct_owner = THIS_MODULE,
.ct_attrs = nvmet_referral_attrs,
.ct_item_ops = &nvmet_referral_item_ops,
Expand All @@ -852,7 +852,7 @@ static struct configfs_group_operations nvmet_referral_group_ops = {
.make_group = nvmet_referral_make,
};

static struct config_item_type nvmet_referrals_type = {
static const struct config_item_type nvmet_referrals_type = {
.ct_owner = THIS_MODULE,
.ct_group_ops = &nvmet_referral_group_ops,
};
Expand Down Expand Up @@ -880,7 +880,7 @@ static struct configfs_item_operations nvmet_port_item_ops = {
.release = nvmet_port_release,
};

static struct config_item_type nvmet_port_type = {
static const struct config_item_type nvmet_port_type = {
.ct_attrs = nvmet_port_attrs,
.ct_item_ops = &nvmet_port_item_ops,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -921,7 +921,7 @@ static struct configfs_group_operations nvmet_ports_group_ops = {
.make_group = nvmet_ports_make,
};

static struct config_item_type nvmet_ports_type = {
static const struct config_item_type nvmet_ports_type = {
.ct_group_ops = &nvmet_ports_group_ops,
.ct_owner = THIS_MODULE,
};
Expand All @@ -940,7 +940,7 @@ static struct configfs_item_operations nvmet_host_item_ops = {
.release = nvmet_host_release,
};

static struct config_item_type nvmet_host_type = {
static const struct config_item_type nvmet_host_type = {
.ct_item_ops = &nvmet_host_item_ops,
.ct_owner = THIS_MODULE,
};
Expand All @@ -963,14 +963,14 @@ static struct configfs_group_operations nvmet_hosts_group_ops = {
.make_group = nvmet_hosts_make_group,
};

static struct config_item_type nvmet_hosts_type = {
static const struct config_item_type nvmet_hosts_type = {
.ct_group_ops = &nvmet_hosts_group_ops,
.ct_owner = THIS_MODULE,
};

static struct config_group nvmet_hosts_group;

static struct config_item_type nvmet_root_type = {
static const struct config_item_type nvmet_root_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
12 changes: 6 additions & 6 deletions drivers/pci/endpoint/pci-ep-cfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static struct configfs_item_operations pci_epc_item_ops = {
.drop_link = pci_epc_epf_unlink,
};

static struct config_item_type pci_epc_type = {
static const struct config_item_type pci_epc_type = {
.ct_item_ops = &pci_epc_item_ops,
.ct_attrs = pci_epc_attrs,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -361,7 +361,7 @@ static struct configfs_item_operations pci_epf_ops = {
.release = pci_epf_release,
};

static struct config_item_type pci_epf_type = {
static const struct config_item_type pci_epf_type = {
.ct_item_ops = &pci_epf_ops,
.ct_attrs = pci_epf_attrs,
.ct_owner = THIS_MODULE,
Expand Down Expand Up @@ -400,7 +400,7 @@ static struct configfs_group_operations pci_epf_group_ops = {
.drop_item = &pci_epf_drop,
};

static struct config_item_type pci_epf_group_type = {
static const struct config_item_type pci_epf_group_type = {
.ct_group_ops = &pci_epf_group_ops,
.ct_owner = THIS_MODULE,
};
Expand Down Expand Up @@ -428,15 +428,15 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group)
}
EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group);

static struct config_item_type pci_functions_type = {
static const struct config_item_type pci_functions_type = {
.ct_owner = THIS_MODULE,
};

static struct config_item_type pci_controllers_type = {
static const struct config_item_type pci_controllers_type = {
.ct_owner = THIS_MODULE,
};

static struct config_item_type pci_ep_type = {
static const struct config_item_type pci_ep_type = {
.ct_owner = THIS_MODULE,
};

Expand Down
Loading

0 comments on commit abc36be

Please sign in to comment.