Skip to content

Commit cddbb79

Browse files
ArvindYadavCsdavem330
authored andcommitted
net: bridge: 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. File size before: text data bss dec hex filename 2645 896 0 3541 dd5 net/bridge/br_sysfs_br.o File size After adding 'const': text data bss dec hex filename 2701 832 0 3533 dcd net/bridge/br_sysfs_br.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 38ef00c commit cddbb79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bridge/br_sysfs_br.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ static struct attribute *bridge_attrs[] = {
865865
NULL
866866
};
867867

868-
static struct attribute_group bridge_group = {
868+
static const struct attribute_group bridge_group = {
869869
.name = SYSFS_BRIDGE_ATTR,
870870
.attrs = bridge_attrs,
871871
};

0 commit comments

Comments
 (0)