From: Jonathan Cameron <jic23@kernel•org>
To: David Lechner <dlechner@baylibre•com>
Cc: "Andy Shevchenko" <andriy.shevchenko@intel•com>,
"Jyoti Bhayana" <jbhayana@google•com>,
"Nuno Sá" <nuno.sa@analog•com>,
"Andy Shevchenko" <andy@kernel•org>,
"Nicolas Ferre" <nicolas.ferre@microchip•com>,
"Alexandre Belloni" <alexandre.belloni@bootlin•com>,
"Claudiu Beznea" <claudiu.beznea@tuxon•dev>,
"Maxime Coquelin" <mcoquelin.stm32@gmail•com>,
"Alexandre Torgue" <alexandre.torgue@foss•st.com>,
"Benson Leung" <bleung@chromium•org>,
"Guenter Roeck" <groeck@chromium•org>,
linux-iio@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-arm-kernel@lists•infradead.org,
linux-stm32@st-md-mailman•stormreply.com,
chrome-platform@lists•linux.dev
Subject: Re: [PATCH 0/8] iio: timestamp declaration cleanup
Date: Mon, 18 May 2026 16:44:44 +0100 [thread overview]
Message-ID: <20260518164444.7fb5f616@jic23-huawei> (raw)
In-Reply-To: <41c0317d-2ce8-412c-818a-4a84201fce29@baylibre.com>
On Mon, 18 May 2026 09:34:48 -0500
David Lechner <dlechner@baylibre•com> wrote:
> On 5/18/26 2:14 AM, Andy Shevchenko wrote:
> > On Mon, May 18, 2026 at 10:09:48AM +0300, Andy Shevchenko wrote:
> >> On Sun, May 17, 2026 at 01:17:17PM -0500, David Lechner wrote:
> >>> While looking around the code, I noticed that there are a lot of places
> >>> were we are manually filling all of the fields of an IIO timestamp.
> >>>
> >>> This is error-prone (as seen in the first patch) and more verbose than
> >>> it needs to be.
> >>>
> >>> I went with the approach of using the existing IIO_CHAN_SOFT_TIMESTAMP()
> >>> macro for doing a struct assignment. This does require a cast, which
> >>
> >> No, it's *not* a cast. It's a compound literal. And instead of doing this in
> >> every driver, add it to the macro (in a separate patch). Oh, let me just cook
> >> it for you (I added that to several cases in the past).
> >
> > 20260518071349.469748-1-andriy.shevchenko@linux•intel.com
>
> Nice, thanks. I agree this will be the cleanest solution.
With that the series looks good to me.
J
>
> >
> >>> makes it a bit more verbose, but we were already doing that in to
> >>> drivers, so I went with it anyway.
> >>
> >>> If we want to consider alternatives, we could make a iio helper function
> >>> or macro like the first and second patches did.
> >
>
next prev parent reply other threads:[~2026-05-18 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-17 18:17 [PATCH 0/8] iio: timestamp declaration cleanup David Lechner
2026-05-17 18:17 ` [PATCH 1/8] iio: common: scmi_sensors: simplify timestamp channel definition David Lechner
2026-05-17 18:17 ` [PATCH 2/8] iio: adc: dln2-adc: " David Lechner
2026-05-17 18:17 ` [PATCH 3/8] iio: adc: at91_adc: " David Lechner
2026-05-17 18:17 ` [PATCH 4/8] iio: adc: cc10001_adc: " David Lechner
2026-05-17 18:17 ` [PATCH 5/8] iio: adc: stm32-adc: " David Lechner
2026-05-17 18:17 ` [PATCH 6/8] iio: common: cros_ec_sensors: " David Lechner
2026-05-17 18:17 ` [PATCH 7/8] iio: light: cros_ec_light_prox: " David Lechner
2026-05-17 18:17 ` [PATCH 8/8] iio: pressure: cros_ec_baro: " David Lechner
2026-05-17 19:22 ` [PATCH 0/8] iio: timestamp declaration cleanup David Lechner
2026-05-18 7:23 ` Andy Shevchenko
2026-05-18 7:09 ` Andy Shevchenko
2026-05-18 7:14 ` Andy Shevchenko
2026-05-18 14:34 ` David Lechner
2026-05-18 15:44 ` Jonathan Cameron [this message]
2026-05-18 7:26 ` Andy Shevchenko
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=20260518164444.7fb5f616@jic23-huawei \
--to=jic23@kernel$(echo .)org \
--cc=alexandre.belloni@bootlin$(echo .)com \
--cc=alexandre.torgue@foss$(echo .)st.com \
--cc=andriy.shevchenko@intel$(echo .)com \
--cc=andy@kernel$(echo .)org \
--cc=bleung@chromium$(echo .)org \
--cc=chrome-platform@lists$(echo .)linux.dev \
--cc=claudiu.beznea@tuxon$(echo .)dev \
--cc=dlechner@baylibre$(echo .)com \
--cc=groeck@chromium$(echo .)org \
--cc=jbhayana@google$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-iio@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-stm32@st-md-mailman$(echo .)stormreply.com \
--cc=mcoquelin.stm32@gmail$(echo .)com \
--cc=nicolas.ferre@microchip$(echo .)com \
--cc=nuno.sa@analog$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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