diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-07-21 11:29:51 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-30 08:01:54 -0700 |
commit | 36b56141b23005c451dd5725d6cfff0c962c1e11 (patch) | |
tree | 8ed56cceaba01a5a2ec5deb9828e4c617a7b3520 /drivers/staging/lustre/lustre/osc | |
parent | staging: lustre: lnet: fix incorrect arguments order calling lstcon_session_new (diff) | |
download | linux-dev-36b56141b23005c451dd5725d6cfff0c962c1e11.tar.xz linux-dev-36b56141b23005c451dd5725d6cfff0c962c1e11.zip |
staging: lustre: 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
9489 992 40 10521 2919 lustre/lustre/osc/lproc_osc.o
1289 288 0 1577 629 lustre/lustre/lmv/lproc_lmv.o
3794 928 40 4762 129a lustre/lustre/lov/lproc_lov.o
3802 576 40 4418 1142 lustre/lustre/mdc/lproc_mdc.o
File size After adding 'const':
text data bss dec hex filename
9553 928 40 10521 2919 lustre/lustre/osc/lproc_osc.o
1353 224 0 1577 629 lustre/lustre/lmv/lproc_lmv.o
3858 864 40 4762 129a lustre/lustre/lov/lproc_lov.o
3866 512 40 4418 1142 lustre/lustre/mdc/lproc_mdc.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/osc')
-rw-r--r-- | drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index 86f252d6adbd..6e0fd155e6b8 100644 --- a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -831,7 +831,7 @@ static struct attribute *osc_attrs[] = { NULL, }; -static struct attribute_group osc_attr_group = { +static const struct attribute_group osc_attr_group = { .attrs = osc_attrs, }; |