RE: [PATCH] staging: unisys: visorbus: constify channel_attr_grp and dev_attr_grp

From: Kershner, David A
Date: Tue Jun 27 2017 - 13:03:18 EST


> -----Original Message-----
> From: Arvind Yadav [mailto:arvind.yadav.cs@xxxxxxxxx]
> Sent: Friday, June 23, 2017 3:37 AM
> To: Kershner, David A <David.Kershner@xxxxxxxxxx>;
> gregkh@xxxxxxxxxxxxxxxxxxx; Thompson, Bryan E.
> <bryan.thompson@xxxxxxxxxx>; Wadgaonkar, Sameer Laxmikant
> <Sameer.Wadgaonkar@xxxxxxxxxx>; jon.frisch@xxxxxxxxxx
> Cc: *S-Par-Maintainer <SParMaintainer@xxxxxxxxxx>;
> devel@xxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH] staging: unisys: visorbus: constify channel_attr_grp and
> dev_attr_grp
>
> File size before:
> text data bss dec hex filename
> 6712 960 521 8193 2001
> drivers/staging/unisys/visorbus/visorbus_main.o
>
> File size After adding 'const':
> text data bss dec hex filename
> 6840 832 521 8193 2001
> drivers/staging/unisys/visorbus/visorbus_main.o
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@xxxxxxxxx>
Acked-by: David Kershner <david.kershner@xxxxxxxxxx>

> ---
> drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c
> b/drivers/staging/unisys/visorbus/visorbus_main.c
> index a692561..26f9885 100644
> --- a/drivers/staging/unisys/visorbus/visorbus_main.c
> +++ b/drivers/staging/unisys/visorbus/visorbus_main.c
> @@ -249,7 +249,7 @@ static ssize_t typename_show(struct device *dev,
> struct device_attribute *attr,
> NULL
> };
>
> -static struct attribute_group channel_attr_grp = {
> +static const struct attribute_group channel_attr_grp = {
> .name = "channel",
> .attrs = channel_attrs,
> };
> @@ -340,7 +340,7 @@ static ssize_t channel_id_show(struct device *dev,
> NULL
> };
>
> -static struct attribute_group dev_attr_grp = {
> +static const struct attribute_group dev_attr_grp = {
> .attrs = dev_attrs,
> };
>
> --
> 1.9.1