Merge branch 'net-attribute_group-const'

Arvind Yadav says:

====================
constify net attribute_group structures.

attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2017-07-18 12:04:57 -07:00
commit 8c5e9fb8ac
10 changed files with 15 additions and 11 deletions

View File

@ -109,7 +109,7 @@ static struct attribute *com20020_state_attrs[] = {
NULL,
};
static struct attribute_group com20020_state_group = {
static const struct attribute_group com20020_state_group = {
.name = NULL,
.attrs = com20020_state_attrs,
};

View File

@ -759,7 +759,7 @@ static struct attribute *per_bond_attrs[] = {
NULL,
};
static struct attribute_group bonding_group = {
static const struct attribute_group bonding_group = {
.name = "bonding",
.attrs = per_bond_attrs,
};

View File

@ -1232,7 +1232,7 @@ static struct attribute *at91_sysfs_attrs[] = {
NULL,
};
static struct attribute_group at91_sysfs_attr_group = {
static const struct attribute_group at91_sysfs_attr_group = {
.attrs = at91_sysfs_attrs,
};

View File

@ -1875,7 +1875,7 @@ static struct attribute *ican3_sysfs_attrs[] = {
NULL,
};
static struct attribute_group ican3_sysfs_attr_group = {
static const struct attribute_group ican3_sysfs_attr_group = {
.attrs = ican3_sysfs_attrs,
};

View File

@ -793,7 +793,9 @@ static struct attribute *cxgb3_attrs[] = {
NULL
};
static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs };
static const struct attribute_group cxgb3_attr_group = {
.attrs = cxgb3_attrs,
};
static ssize_t tm_attr_show(struct device *d,
char *buf, int sched)
@ -880,7 +882,9 @@ static struct attribute *offload_attrs[] = {
NULL
};
static struct attribute_group offload_attr_group = {.attrs = offload_attrs };
static const struct attribute_group offload_attr_group = {
.attrs = offload_attrs,
};
/*
* Sends an sk_buff to an offload queue driver

View File

@ -367,7 +367,7 @@ static struct attribute *cdc_ncm_sysfs_attrs[] = {
NULL,
};
static struct attribute_group cdc_ncm_sysfs_attr_group = {
static const struct attribute_group cdc_ncm_sysfs_attr_group = {
.name = "cdc_ncm",
.attrs = cdc_ncm_sysfs_attrs,
};

View File

@ -4324,7 +4324,7 @@ static struct attribute *ipw2100_sysfs_entries[] = {
NULL,
};
static struct attribute_group ipw2100_attribute_group = {
static const struct attribute_group ipw2100_attribute_group = {
.attrs = ipw2100_sysfs_entries,
};

View File

@ -11500,7 +11500,7 @@ static struct attribute *ipw_sysfs_entries[] = {
NULL
};
static struct attribute_group ipw_attribute_group = {
static const struct attribute_group ipw_attribute_group = {
.name = NULL, /* put in device directory */
.attrs = ipw_sysfs_entries,
};

View File

@ -3464,7 +3464,7 @@ static struct attribute *il3945_sysfs_entries[] = {
NULL
};
static struct attribute_group il3945_attribute_group = {
static const struct attribute_group il3945_attribute_group = {
.name = NULL, /* put in device directory */
.attrs = il3945_sysfs_entries,
};

View File

@ -4654,7 +4654,7 @@ static struct attribute *il_sysfs_entries[] = {
NULL
};
static struct attribute_group il_attribute_group = {
static const struct attribute_group il_attribute_group = {
.name = NULL, /* put in device directory */
.attrs = il_sysfs_entries,
};