Re: [PATCH 3/6] iio: dac: ad5592r-base: Constify struct iio_chan_spec_ext_info

2020-05-31 Thread Jonathan Cameron
On Wed, 27 May 2020 04:22:46 +
"Ardelean, Alexandru"  wrote:

> On Tue, 2020-05-26 at 23:02 +0200, Rikard Falkeborn wrote:
> > [External]
> > 
> > ad5592r_ext_info is not modified and can be made const to allow the
> > compiler to put it in read-only memory.
> > 
> > Before:
> >textdata bss dec hex filename
> >   132932088 256   156373d15 drivers/iio/dac/ad5592r-base.o
> > 
> > After:
> >textdata bss dec hex filename
> >   134211960 256   156373d15 drivers/iio/dac/ad5592r-base.o
> >   
> 
> Acked-by: Alexandru Ardelean 
Applied.

Thanks
> > Signed-off-by: Rikard Falkeborn 
> > ---
> >  drivers/iio/dac/ad5592r-base.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-
> > base.c
> > index 410e90e5f75f..7402f67a551d 100644
> > --- a/drivers/iio/dac/ad5592r-base.c
> > +++ b/drivers/iio/dac/ad5592r-base.c
> > @@ -484,7 +484,7 @@ static ssize_t ad5592r_show_scale_available(struct
> > iio_dev *iio_dev,
> > st->scale_avail[1][0], st->scale_avail[1][1]);
> >  }
> >  
> > -static struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
> > +static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
> > {
> >  .name = "scale_available",
> >  .read = ad5592r_show_scale_available,  



Re: [PATCH 3/6] iio: dac: ad5592r-base: Constify struct iio_chan_spec_ext_info

2020-05-26 Thread Ardelean, Alexandru
On Tue, 2020-05-26 at 23:02 +0200, Rikard Falkeborn wrote:
> [External]
> 
> ad5592r_ext_info is not modified and can be made const to allow the
> compiler to put it in read-only memory.
> 
> Before:
>textdata bss dec hex filename
>   132932088 256   156373d15 drivers/iio/dac/ad5592r-base.o
> 
> After:
>textdata bss dec hex filename
>   134211960 256   156373d15 drivers/iio/dac/ad5592r-base.o
> 

Acked-by: Alexandru Ardelean 

> Signed-off-by: Rikard Falkeborn 
> ---
>  drivers/iio/dac/ad5592r-base.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-
> base.c
> index 410e90e5f75f..7402f67a551d 100644
> --- a/drivers/iio/dac/ad5592r-base.c
> +++ b/drivers/iio/dac/ad5592r-base.c
> @@ -484,7 +484,7 @@ static ssize_t ad5592r_show_scale_available(struct
> iio_dev *iio_dev,
>   st->scale_avail[1][0], st->scale_avail[1][1]);
>  }
>  
> -static struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
> +static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
>   {
>.name = "scale_available",
>.read = ad5592r_show_scale_available,


[PATCH 3/6] iio: dac: ad5592r-base: Constify struct iio_chan_spec_ext_info

2020-05-26 Thread Rikard Falkeborn
ad5592r_ext_info is not modified and can be made const to allow the
compiler to put it in read-only memory.

Before:
   textdata bss dec hex filename
  132932088 256   156373d15 drivers/iio/dac/ad5592r-base.o

After:
   textdata bss dec hex filename
  134211960 256   156373d15 drivers/iio/dac/ad5592r-base.o

Signed-off-by: Rikard Falkeborn 
---
 drivers/iio/dac/ad5592r-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/dac/ad5592r-base.c b/drivers/iio/dac/ad5592r-base.c
index 410e90e5f75f..7402f67a551d 100644
--- a/drivers/iio/dac/ad5592r-base.c
+++ b/drivers/iio/dac/ad5592r-base.c
@@ -484,7 +484,7 @@ static ssize_t ad5592r_show_scale_available(struct iio_dev 
*iio_dev,
st->scale_avail[1][0], st->scale_avail[1][1]);
 }
 
-static struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
+static const struct iio_chan_spec_ext_info ad5592r_ext_info[] = {
{
 .name = "scale_available",
 .read = ad5592r_show_scale_available,
-- 
2.26.2