From: David Lechner <dlechner@baylibre.com>
To: Sanjay Chitroda <sanjayembeddedse@gmail.com>,
jic23@kernel.org, nuno.sa@analog.com, andy@kernel.org
Cc: kees@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iio: st_sensors: drop temporary kmalloc buffer and reuse buffer_data
Date: Sat, 14 Mar 2026 15:30:59 -0500 [thread overview]
Message-ID: <8bb22b8b-7229-4942-80f1-6eccf9f26a8c@baylibre.com> (raw)
In-Reply-To: <20260312063424.3846945-1-sanjayembedded@gmail.com>
On 3/12/26 1:34 AM, Sanjay Chitroda wrote:
> From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
>
> Replace the per-call kmalloc() scratch buffer with the statically allocated
"statically allocated" is a bit misleading. It is just an existing buffer
in the private driver data (dynamically allocated during probe).
> buffer_data[] field present in struct st_sensor_data. The existing buffer
> is DMA-aligned and sufficiently sized for all channel widths, so using it
> avoids unnecessary dynamic memory allocation on each read.
>
> This simplifies the code, removes redundant allocation and cleanup.
> No functional change intended.
>
> Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
> ---
Reviewed-by: David Lechner <dlechner@baylibre.com>
prev parent reply other threads:[~2026-03-14 20:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 6:34 Sanjay Chitroda
2026-03-14 20:30 ` David Lechner [this message]
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=8bb22b8b-7229-4942-80f1-6eccf9f26a8c@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=kees@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sanjayembeddedse@gmail.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
all inboxes | Powered by JetHome®