From: Niklas Cassel <cassel@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-ide@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3] ata: ahci_tegra: use devm_kzalloc_flex()
Date: Wed, 11 Nov 2026 09:38:27 +0100 [thread overview]
Message-ID: <avQpg7e6cVWhXjHM@ryzen> (raw)
In-Reply-To: <20261111023939.75386-1-rosenp@gmail.com>
Hello Rosen,
On Tue, Nov 10, 2026 at 06:39:39PM -0800, Rosen Penev wrote:
> Combine allocations into one by using a flexible array member.
Thanks for adding the comment and fixing the subject.
However, the commit log still does not explain the benefit, so my
reply to V2 still applies:
https://lore.kernel.org/linux-ide/ah1HD1aOyTnMBEqD@ryzen/
A flexible array member also has disadvantages: nothing can be added
after it, and there can be only one per struct.
If we use one anyway, it should be annotated with __counted_by(), as
Damien and I asked for in V1. devm_kzalloc_flex() calls
__set_flex_counter(), so that should mostly be a matter of adding a
counter member.
Since neither Jon nor I am a fan of this change, I will only apply a
V4 if Jon explicitly asks for it.
Kind regards,
Niklas
prev parent reply other threads:[~2026-11-11 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 2:39 Rosen Penev
2026-11-11 8:38 ` Niklas Cassel [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=avQpg7e6cVWhXjHM@ryzen \
--to=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=thierry.reding@kernel.org \
/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®