aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-07-21 11:29:53 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-30 08:01:54 -0700
commit9afdc07eb7e7e50ff6a6064bca5834b6cae1c2f4 (patch)
tree175cc7a2a3153b79eb60573a9a4f789f3f68f2cf
parentstaging: lustre: ldlm: constify attribute_group structures. (diff)
downloadwireguard-linux-9afdc07eb7e7e50ff6a6064bca5834b6cae1c2f4.tar.xz
wireguard-linux-9afdc07eb7e7e50ff6a6064bca5834b6cae1c2f4.zip
staging: lustre: obdclass: linux: constify attribute_group structures.
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-module.c2
-rw-r--r--drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 9f5e8299d7e4..eb88bd9c9b5e 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -405,7 +405,7 @@ static const struct file_operations obd_device_list_fops = {
struct kobject *lustre_kobj;
EXPORT_SYMBOL_GPL(lustre_kobj);
-static struct attribute_group lustre_attr_group = {
+static const struct attribute_group lustre_attr_group = {
.attrs = lustre_attrs,
};
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
index e6c785afceba..814334b2c297 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
@@ -151,7 +151,7 @@ static struct attribute *lustre_attrs[] = {
NULL,
};
-static struct attribute_group lustre_attr_group = {
+static const struct attribute_group lustre_attr_group = {
.attrs = lustre_attrs,
};