[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vc8u2N2AHWtnPRmRXWKN3u8Qi=yvx5afbFh4NLNb8-y9A@mail.gmail.com>
Date: Fri, 12 Sep 2025 08:38:39 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: 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, 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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists