Skip to content

Commit

Permalink
9p: Constify static struct v9fs_attr_group
Browse files Browse the repository at this point in the history
The only usage of v9fs_attr_group is to pass its address to
sysfs_create_group() and sysfs_create_group(), both which takes pointers
to const struct attribute_group. Make it const to allow the compiler to
put it in read-only memory.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rikard Falkeborn <[email protected]>
Signed-off-by: Dominique Martinet <[email protected]>
  • Loading branch information
rikardfalkeborn authored and martinetd committed Mar 30, 2021
1 parent a5e13c6 commit 0dae522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/9p/v9fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ static struct attribute *v9fs_attrs[] = {
NULL,
};

static struct attribute_group v9fs_attr_group = {
static const struct attribute_group v9fs_attr_group = {
.attrs = v9fs_attrs,
};

Expand Down

0 comments on commit 0dae522

Please sign in to comment.