From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: David Lechner <dlechner@baylibre.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: proximity: sx9500: use stack allocated buffer for scan data
Date: Fri, 11 Jul 2025 19:42:25 +0300 [thread overview]
Message-ID: <aHE-8VDgQ7WuoA_y@smile.fi.intel.com> (raw)
In-Reply-To: <20250711-iio-use-more-iio_declare_buffer_with_ts-4-v1-1-1a1e521cf747@baylibre.com>
On Fri, Jul 11, 2025 at 10:47:57AM -0500, David Lechner wrote:
> Use IIO_DECLARE_BUFFER_WITH_TS() to declare a stack allocated buffer
> in sx9500_trigger_handler(). Since the scan buffer isn't used outside
> of this function, it doesn't need to be in struct sx9500_data.
>
> By always allocating enough space for the maximum number of channels,
> we can avoid having to reallocate the buffer each time buffered reads
> are enabled.
Ag ood one!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-07-11 16:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 15:47 [PATCH] iio: proximity: sx9500: use stack allocated buffer for scan data David Lechner
2025-07-11 16:42 ` Andy Shevchenko [this message]
2025-07-13 13:55 ` Jonathan Cameron
2025-07-13 13:58 ` Jonathan Cameron
2025-07-13 16:47 ` David Lechner
2025-07-14 18:26 ` 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=aHE-8VDgQ7WuoA_y@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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