Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"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: Sun, 13 Jul 2025 14:55:33 +0100	[thread overview]
Message-ID: <20250713145533.5a3d4336@jic23-huawei> (raw)
In-Reply-To: <aHE-8VDgQ7WuoA_y@smile.fi.intel.com>

On Fri, 11 Jul 2025 19:42:25 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

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

Applied.

  reply	other threads:[~2025-07-13 13:55 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
2025-07-13 13:55   ` Jonathan Cameron [this message]
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=20250713145533.5a3d4336@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --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