Skip to content

Commit

Permalink
mm/huge_memory.c: constify attribute_group structures
Browse files Browse the repository at this point in the history
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.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ArvindYadavCs authored and torvalds committed Sep 7, 2017
1 parent fd147cb commit 8aa95a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static struct attribute *hugepage_attr[] = {
NULL,
};

static struct attribute_group hugepage_attr_group = {
static const struct attribute_group hugepage_attr_group = {
.attrs = hugepage_attr,
};

Expand Down

0 comments on commit 8aa95a2

Please sign in to comment.