staging: lustre: constify attribute_group structures.
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Fri, 21 Jul 2017 05:59:51 +0000 (11:29 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Jul 2017 15:01:54 +0000 (08:01 -0700)
commit36b56141b23005c451dd5725d6cfff0c962c1e11
tree8ed56cceaba01a5a2ec5deb9828e4c617a7b3520
parent52bc17b0298f7fa721fee447ddf05c91df361786
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>
drivers/staging/lustre/lustre/include/lprocfs_status.h
drivers/staging/lustre/lustre/lmv/lproc_lmv.c
drivers/staging/lustre/lustre/lov/lproc_lov.c
drivers/staging/lustre/lustre/mdc/lproc_mdc.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/osc/lproc_osc.c