From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Antony Kurniawan Soemardi <linux@smankusors.com>
Cc: "Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
phone-devel@vger.kernel.org
Subject: Re: [PATCH v4 3/4] iio: adc: qcom-pm8xxx-xoadc: constify pointers in read operations
Date: Mon, 27 Apr 2026 10:58:13 +0300 [thread overview]
Message-ID: <ae8XFUvF1NPNePhQ@ashevche-desk.local> (raw)
In-Reply-To: <20260426-pm8xxx-xoadc-label-v4-3-0ec782362615@smankusors.com>
On Sat, Apr 25, 2026 at 08:39:20PM +0000, Antony Kurniawan Soemardi wrote:
> These functions do not modify the indio_dev & adc structure, so they
> should be marked const to allow the compiler to catch any accidental
> modifications and to document the read only nature of these functions.
...
> - struct pm8xxx_xoadc *adc = iio_priv(indio_dev);
> + const struct iio_dev *indio_dev = d;
> + const struct pm8xxx_xoadc *adc = iio_priv(indio_dev);
>
> complete(&adc->complete);
Pointer to a constant object assumes no modification to that, isn't it? Please,
compile your code first.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-04-27 7:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 20:39 [PATCH v4 0/4] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels from DT Antony Kurniawan Soemardi
2026-04-25 20:39 ` [PATCH v4 1/4] ARM: dts: qcom: pm8921: add labels for ADC channels Antony Kurniawan Soemardi
2026-04-25 20:39 ` [PATCH v4 2/4] iio: adc: qcom-pm8xxx-xoadc: remove redundant error logs when reading values Antony Kurniawan Soemardi
2026-04-27 7:53 ` Andy Shevchenko
2026-04-25 20:39 ` [PATCH v4 3/4] iio: adc: qcom-pm8xxx-xoadc: constify pointers in read operations Antony Kurniawan Soemardi
2026-04-27 7:58 ` Andy Shevchenko [this message]
2026-04-25 20:39 ` [PATCH v4 4/4] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels Antony Kurniawan Soemardi
2026-04-26 13:21 ` [PATCH v4 0/4] iio: adc: qcom-pm8xxx-xoadc: add support for reading channel labels from DT Jonathan Cameron
2026-04-26 13:24 ` 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=ae8XFUvF1NPNePhQ@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andersson@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@smankusors.com \
--cc=nuno.sa@analog.com \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
/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