Commit 8c5e9fb8 authored by David S. Miller's avatar David S. Miller
Browse files

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: default avatarDavid S. Miller <davem@davemloft.net>
parents 7d2a055b 98dc8373
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
};
+1 −1
Original line number Diff line number Diff line
@@ -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,
};
+1 −1
Original line number Diff line number Diff line
@@ -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,
};

+1 −1
Original line number Diff line number Diff line
@@ -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,
};

+6 −2
Original line number Diff line number Diff line
@@ -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
Loading