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 <[email protected]>
---
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
> -----Original Message-----
> From: Arvind Yadav [mailto:[email protected]]
> Sent: Friday, June 23, 2017 3:37 AM
> To: Kershner, David A <[email protected]>;
> [email protected]; Thompson, Bryan E.
> <[email protected]>; Wadgaonkar, Sameer Laxmikant
> <[email protected]>; [email protected]
> Cc: *S-Par-Maintainer <[email protected]>;
> [email protected]; [email protected]
> 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 <[email protected]>
Acked-by: David Kershner <[email protected]>
> ---
> 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