From: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
To: Quentin Schulz <quentin.schulz@free-electrons.com>
Cc: thomas.petazzoni@free-electrons.com, lars@metafoo.de,
linux-iio@vger.kernel.org, antoine.tenart@free-electrons.com,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, knaack.h@gmx.de,
maxime.ripard@free-electrons.com, jic23@kernel.org
Subject: Re: [PATCH v4 3/3] iio: adc: add support for Allwinner SoCs ADC
Date: Mon, 5 Sep 2016 11:02:21 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1609051101560.12528@pmeerw.net> (raw)
In-Reply-To: <d40388ec-bf25-92b2-eeb6-39749d88c15c@free-electrons.com>
> >>>> +{
> >>>> + return SUN6I_GPADC_CTRL1_ADC_CHAN_SELECT(chan);
> >>>> +}
> >>>> +
> >>>> +struct soc_specific {
> >>>> + const int temp_offset;
> >>>
> >>> wondering why you constify every member?
> >>>
> >>
> >> Because they're supposed to be fixed values? It won't change in runtime.
> >> Is there any reason why I shouldn't do that?
> >
> > yes, but using the entire struct as const has the same effect;
> > constifying individual members makes more sense if there are also
> > non-const members
> >
> > nothing wrong, just unusual
> >
>
> So I would let all members non-const and then when using the struct
> soc_specific as a member in a struct or as a variable I would prefix it
> with const? That's what you mean by using the entire struct as const?
yes, exactly
thanks, p.
--
Peter Meerwald-Stadler
+43-664-2444418 (mobile)
next prev parent reply other threads:[~2016-09-05 9:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 14:05 [PATCH v4 0/3] " Quentin Schulz
2016-09-01 14:05 ` [PATCH v4 1/3] hwmon: iio_hwmon: delay probing with late_initcall Quentin Schulz
2016-09-01 14:05 ` [PATCH v4 2/3] mfd: add support for Allwinner SoCs ADC Quentin Schulz
2016-09-04 14:36 ` Jonathan Cameron
2016-09-01 14:05 ` [PATCH v4 3/3] iio: adc: " Quentin Schulz
2016-09-04 14:35 ` Jonathan Cameron
2016-09-05 6:29 ` Quentin Schulz
2016-09-05 19:51 ` Jonathan Cameron
2016-09-04 16:12 ` Peter Meerwald-Stadler
2016-09-05 6:48 ` Quentin Schulz
2016-09-05 8:07 ` Peter Meerwald-Stadler
2016-09-05 8:52 ` Quentin Schulz
2016-09-05 9:02 ` Peter Meerwald-Stadler [this message]
2016-09-05 7:07 ` Maxime Ripard
2016-09-05 7:11 ` Quentin Schulz
2016-09-05 16:47 ` Joshua Clayton
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=alpine.DEB.2.02.1609051101560.12528@pmeerw.net \
--to=pmeerw@pmeerw.net \
--cc=antoine.tenart@free-electrons.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=quentin.schulz@free-electrons.com \
--cc=thomas.petazzoni@free-electrons.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®