Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614375 > unrolled thread
| Started by | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| First post | 2017-04-01 04:30 +0200 |
| Last post | 2017-04-01 12:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: iio: light: constify attribute_group structures simran singhal <singhalsimran0@gmail.com> - 2017-04-01 04:30 +0200
Re: [PATCH] staging: iio: light: constify attribute_group structures Jonathan Cameron <jic23@kernel.org> - 2017-04-01 12:50 +0200
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Date | 2017-04-01 04:30 +0200 |
| Subject | [PATCH] staging: iio: light: constify attribute_group structures |
| Message-ID | <trgXD-4Qb-1@gated-at.bofh.it> |
As the event_attrs field of iio_info structures is constant, so these
attribute_group structures can also be declared constant.
File size before:
text data bss dec hex filename
15064 1528 0 16592 40d0
drivers/staging/iio/light/tsl2x7x_core.o
File size after:
text data bss dec hex filename
15192 1400 0 16592 40d0
drivers/staging/iio/light/tsl2x7x_core.o
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/iio/light/tsl2x7x_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
index 0490c1d..9a0046a 100644
--- a/drivers/staging/iio/light/tsl2x7x_core.c
+++ b/drivers/staging/iio/light/tsl2x7x_core.c
@@ -1676,7 +1676,7 @@ static const struct attribute_group tsl2X7X_device_attr_group_tbl[] = {
},
};
-static struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
+static const struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
[ALS] = {
.attrs = tsl2X7X_ALS_event_attrs,
.name = "events",
--
2.7.4
[toc] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-04-01 12:50 +0200 |
| Message-ID | <troLv-1qN-1@gated-at.bofh.it> |
| In reply to | #1614375 |
On 01/04/17 03:28, simran singhal wrote:
> As the event_attrs field of iio_info structures is constant, so these
> attribute_group structures can also be declared constant.
>
> File size before:
> text data bss dec hex filename
> 15064 1528 0 16592 40d0
> drivers/staging/iio/light/tsl2x7x_core.o
>
> File size after:
> text data bss dec hex filename
> 15192 1400 0 16592 40d0
> drivers/staging/iio/light/tsl2x7x_core.o
>
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Not a big thing, but as this only touches the one driver, i would have
liked that mentioned in the naming of the patch...
I've added it.
Applied.
> ---
> drivers/staging/iio/light/tsl2x7x_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
> index 0490c1d..9a0046a 100644
> --- a/drivers/staging/iio/light/tsl2x7x_core.c
> +++ b/drivers/staging/iio/light/tsl2x7x_core.c
> @@ -1676,7 +1676,7 @@ static const struct attribute_group tsl2X7X_device_attr_group_tbl[] = {
> },
> };
>
> -static struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
> +static const struct attribute_group tsl2X7X_event_attr_group_tbl[] = {
> [ALS] = {
> .attrs = tsl2X7X_ALS_event_attrs,
> .name = "events",
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web