[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5e279cf72409504861c80bb4d2e4e5f6bc59d94c.camel@gmail.com>
Date: Fri, 12 Sep 2025 09:19:43 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>, Daniel Lezcano
<daniel.lezcano@...aro.org>
Cc: David Lechner <dlechner@...libre.com>, jic23@...nel.org,
nuno.sa@...log.com, andy@...nel.org, robh@...nel.org, conor+dt@...nel.org,
krzk+dt@...nel.org, linux-iio@...r.kernel.org, s32@....com,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
chester62515@...il.com, mbrugger@...e.com, ghennadi.procopciuc@....nxp.com
Subject: Re: [PATCH v2 2/2] iio: adc: Add the NXP SAR ADC support for the
s32g2/3 platforms
On Fri, 2025-09-12 at 08:38 +0300, Andy Shevchenko wrote:
> On Fri, Sep 12, 2025 at 2:03 AM Daniel Lezcano
> <daniel.lezcano@...aro.org> wrote:
> > On 11/09/2025 22:10, David Lechner wrote:
> > > On 9/10/25 10:57 AM, Daniel Lezcano wrote:
>
> [ ... ]
>
> > > > + /* iio_push_to_buffers_with_timestamp should not be called
> > > > + * with dma_samples as parameter. The samples will be
> > > > smashed
> > > > + * if timestamp is enabled.
> > > > + */
>
> /*
> * Btw, comment style for multi-line
> * comments is wrong for this subsystem.
> * Use this as an example, Also, refer to
> * the function as func(), i.e. mind the parentheses.
> */
>
> > > > + timestamp = iio_get_time_ns(indio_dev);
> > > > + ret = iio_push_to_buffers_with_timestamp(indio_dev,
> > > > + info->buffer,
> > > > + timestamp);
> > >
> > > Is it OK to call this with spinlock held? It looks like it can call
> > > devm_krealloc() which may sleep.
> >
> > It should be ok, devm_krealloc is in the code path of
> > iio_push_to_buffers_with_ts_unaligned(), not in
> > iio_push_to_buffers_with_timestamp()
>
> This is a good observation, can we document this in the respective
> kernel-doc:s please? Also add might_sleep().might_sleep_if() in the
> appropriate functions.
That's a good idea!
- Nuno Sá
Powered by blists - more mailing lists