Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jyoti Bhayana" <jbhayana@google.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"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 10:14:11 +0300	[thread overview]
Message-ID: <agq8Q1wpzIw4XhNQ@ashevche-desk.local> (raw)
In-Reply-To: <agq7PPw0qupI_8Dh@ashevche-desk.local>

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

> > 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.

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2026-05-18  7:14 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 [this message]
2026-05-18 14:34     ` David Lechner
2026-05-18 15:44       ` Jonathan Cameron
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=agq8Q1wpzIw4XhNQ@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andy@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=dlechner@baylibre.com \
    --cc=groeck@chromium.org \
    --cc=jbhayana@google.com \
    --cc=jic23@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=nuno.sa@analog.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