Re: [PATCHv3] dmaengine: hsu: use kzalloc_flex()
From: Andy Shevchenko
Date: Tue Mar 31 2026 - 00:23:04 EST
On Mon, Mar 30, 2026 at 11:44 PM Rosen Penev <rosenp@xxxxxxxxx> wrote:
>
> Simplifies allocations by using a flexible array member in this struct.
>
> Remove hsu_dma_alloc_desc(). It now offers no readability advantages in
> this single usage.
>
> Add __counted_by to get extra runtime analysis. Assign counting variable
> after allocation as required by __counted_by.
>
> Apply the exact same treatment to struct hsu_dma and devm_kzalloc().
>
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> ---
> v3: update description.
> v2: address review comments.
Wait a bit, I still get it unclear. Let's continue the discussion in v2.
--
With Best Regards,
Andy Shevchenko