From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Ardelean, Alexandru" <alexandru.Ardelean@analog.com>,
"rikard.falkeborn@gmail.com" <rikard.falkeborn@gmail.com>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"Hennerich, Michael" <Michael.Hennerich@analog.com>,
"knaack.h@gmx.de" <knaack.h@gmx.de>,
"lars@metafoo.de" <lars@metafoo.de>,
"pmeerw@pmeerw.net" <pmeerw@pmeerw.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/6] iio: dac: ad5686: Constify static struct iio_chan_spec
Date: Tue, 18 Aug 2020 21:30:17 +0200 [thread overview]
Message-ID: <20200818193017.GA1610@rikard> (raw)
In-Reply-To: <20200531144715.089886ce@archlinux>
On Sun, May 31, 2020 at 02:47:15PM +0100, Jonathan Cameron wrote:
> On Wed, 27 May 2020 04:50:46 +0000
> "Ardelean, Alexandru" <alexandru.Ardelean@analog.com> wrote:
>
> > On Tue, 2020-05-26 at 23:02 +0200, Rikard Falkeborn wrote:
> > > [External]
> > >
> > > These are never modified and can be made const to allow the compiler to
> > > put it in read-only memory.
> > >
> > > Before:
> > > text data bss dec hex filename
> > > 6642 12608 64 19314 4b72 drivers/iio/dac/ad5686.o
> > >
> > > After:
> > > text data bss dec hex filename
> > > 16946 2304 64 19314 4b72 drivers/iio/dac/ad5686.o
> > >
> >
> > Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> >
> Applied.
>
> thanks,
Was this one really applied? I can't see it anywhere? The rest of the
patches in the series are in Linus' tree.
Rikard
>
> > > Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> > > ---
> > > drivers/iio/dac/ad5686.c | 8 ++++----
> > > drivers/iio/dac/ad5686.h | 2 +-
> > > 2 files changed, 5 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
> > > index 8dd67da0a7da..6de48f618c95 100644
> > > --- a/drivers/iio/dac/ad5686.c
> > > +++ b/drivers/iio/dac/ad5686.c
> > > @@ -206,12 +206,12 @@ static const struct iio_chan_spec_ext_info
> > > ad5686_ext_info[] = {
> > > }
> > >
> > > #define DECLARE_AD5693_CHANNELS(name, bits, _shift) \
> > > -static struct iio_chan_spec name[] = { \
> > > +static const struct iio_chan_spec name[] = { \
> > > AD5868_CHANNEL(0, 0, bits, _shift), \
> > > }
> > >
> > > #define DECLARE_AD5686_CHANNELS(name, bits, _shift) \
> > > -static struct iio_chan_spec name[] = { \
> > > +static const struct iio_chan_spec name[] = { \
> > > AD5868_CHANNEL(0, 1, bits, _shift), \
> > > AD5868_CHANNEL(1, 2, bits, _shift), \
> > > AD5868_CHANNEL(2, 4, bits, _shift), \
> > > @@ -219,7 +219,7 @@ static struct iio_chan_spec name[] = {
> > > \
> > > }
> > >
> > > #define DECLARE_AD5676_CHANNELS(name, bits, _shift) \
> > > -static struct iio_chan_spec name[] = { \
> > > +static const struct iio_chan_spec name[] = { \
> > > AD5868_CHANNEL(0, 0, bits, _shift), \
> > > AD5868_CHANNEL(1, 1, bits, _shift), \
> > > AD5868_CHANNEL(2, 2, bits, _shift), \
> > > @@ -231,7 +231,7 @@ static struct iio_chan_spec name[] = {
> > > \
> > > }
> > >
> > > #define DECLARE_AD5679_CHANNELS(name, bits, _shift) \
> > > -static struct iio_chan_spec name[] = { \
> > > +static const struct iio_chan_spec name[] = { \
> > > AD5868_CHANNEL(0, 0, bits, _shift), \
> > > AD5868_CHANNEL(1, 1, bits, _shift), \
> > > AD5868_CHANNEL(2, 2, bits, _shift), \
> > > diff --git a/drivers/iio/dac/ad5686.h b/drivers/iio/dac/ad5686.h
> > > index 52009b5eef88..a15f2970577e 100644
> > > --- a/drivers/iio/dac/ad5686.h
> > > +++ b/drivers/iio/dac/ad5686.h
> > > @@ -104,7 +104,7 @@ typedef int (*ad5686_read_func)(struct ad5686_state
> > > *st, u8 addr);
> > > struct ad5686_chip_info {
> > > u16 int_vref_mv;
> > > unsigned int num_channels;
> > > - struct iio_chan_spec *channels;
> > > + const struct iio_chan_spec *channels;
> > > enum ad5686_regmap_type regmap_type;
> > > };
> > >
>
next prev parent reply other threads:[~2020-08-18 19:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 21:02 [PATCH 0/6] drivers/iio: Constify structs Rikard Falkeborn
2020-05-26 21:02 ` [PATCH 1/6] iio: adc: max11100: Constify struct iio_chan_spec Rikard Falkeborn
2020-05-31 13:07 ` Jonathan Cameron
2020-05-26 21:02 ` [PATCH 2/6] iio: dac: ad5380: Constify struct iio_chan_spec_ext_info Rikard Falkeborn
2020-05-27 4:22 ` Ardelean, Alexandru
2020-05-31 13:44 ` Jonathan Cameron
2020-05-26 21:02 ` [PATCH 3/6] iio: dac: ad5592r-base: " Rikard Falkeborn
2020-05-27 4:22 ` Ardelean, Alexandru
2020-05-31 13:47 ` Jonathan Cameron
2020-05-26 21:02 ` [PATCH 4/6] iio: dac: ad5686: Constify static struct iio_chan_spec Rikard Falkeborn
2020-05-27 4:50 ` Ardelean, Alexandru
2020-05-31 13:47 ` Jonathan Cameron
2020-08-18 19:30 ` Rikard Falkeborn [this message]
2020-08-22 10:31 ` Jonathan Cameron
2020-05-26 21:02 ` [PATCH 5/6] iio: light: stk3310: Constify regmap_config Rikard Falkeborn
2020-05-31 13:47 ` Jonathan Cameron
2020-05-26 21:02 ` [PATCH 6/6] iio: magnetometer: mmc35240: Constify struct reg_default Rikard Falkeborn
2020-05-31 13:48 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200818193017.GA1610@rikard \
--to=rikard.falkeborn@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=alexandru.Ardelean@analog.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.