From: "Nuno Sá" <noname.nuno@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: "Nuno Sá" <nuno.sa@analog.com>,
dmaengine@vger.kernel.org, Frank.Li@kernel.org, vkoul@kernel.org
Subject: Re: [PATCH 5/9] dmaengine: stm32-dma3: Use bus width capability helpers
Date: Mon, 3 Aug 2026 13:41:00 +0100 [thread overview]
Message-ID: <anCMRfZDO7y5gmtU@nsa> (raw)
In-Reply-To: <20260730143528.B7ABC1F00A3D@smtp.kernel.org>
On Thu, Jul 30, 2026 at 02:35:28PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Direct return on error from `dma_set_src_bus_widths()` or `dma_set_dst_bus_widths()` bypasses clock cleanup, causing a resource leak.
> --
Yeps! This needs fixing in v2.
- Nuno Sá
>
> --- Patch [5]: [PATCH 5/9] dmaengine: stm32-dma3: Use bus width capability helpers ---
> Please note that the format of this report has been altered due to recitation
> restrictions. The original patch code is not quoted directly, and findings are
> summarized in a free-form text format.
>
> commit 843bd75e7b8b643c8fda123b493184a039d48a35
> Author: Nuno Sá <nuno.sa@analog.com>
>
> dmaengine: stm32-dma3: Use bus width capability helpers
>
> This commit advertises the controller-wide bus width capabilities through the
> new dma_set_src_bus_widths() and dma_set_dst_bus_widths() helpers. It also
> updates the per-channel capability callback to clear unsupported widths
> through the dma_slave_caps helpers.
>
> [Severity: Medium]
> In the stm32_dma3_probe() function, the patch adds calls to
> dma_set_src_bus_widths() and dma_set_dst_bus_widths(). If either of these
> helper functions returns an error, the code now does a direct return with the
> error code.
>
> Does this direct return bypass the clock cleanup?
>
> Earlier in the probe function, the clock is prepared and enabled via
> clk_prepare_enable(ddata->clk). If an error occurs later, the normal error
> handling path is to goto err_clk_disable to ensure the clock is properly
> disabled. Returning directly here leaves the hardware clock prepared and
> enabled, causing a resource leak.
>
> Should these return statements be changed to goto err_clk_disable instead?
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260730-dmaengine-support-wider-dma-masks-v1-0-3732f1f9d9ca@analog.com?part=5
next prev parent reply other threads:[~2026-08-03 12:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:23 [PATCH 0/9] dmaengine: Support bus widths of 32 bytes and above Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:23 ` [PATCH 1/9] " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:38 ` sashiko-bot
2026-07-30 19:16 ` Frank Li
2026-08-01 2:42 ` Jonathan Cameron
2026-08-01 2:46 ` Jonathan Cameron
2026-08-03 12:35 ` Nuno Sá
2026-07-30 14:23 ` [PATCH 2/9] dmaengine: dma-axi-dmac: Use bus width capability helpers Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:39 ` sashiko-bot
2026-07-30 19:23 ` Frank Li
2026-07-30 14:23 ` [PATCH 3/9] dmaengine: dw-axi-dmac: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:36 ` sashiko-bot
2026-07-30 19:24 ` Frank Li
2026-07-30 14:23 ` [PATCH 4/9] dmaengine: qcom: gpi: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:43 ` sashiko-bot
2026-07-30 19:25 ` Frank Li
2026-07-30 14:23 ` [PATCH 5/9] dmaengine: stm32-dma3: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:35 ` sashiko-bot
2026-08-03 12:41 ` Nuno Sá [this message]
2026-07-30 19:26 ` Frank Li
2026-07-30 14:23 ` [PATCH 6/9] iio: buffer-dmaengine: Use dma_slave_caps bus width accessors Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:27 ` Frank Li
2026-07-30 14:23 ` [PATCH 7/9] ALSA: pcm_dmaengine: Use dma_slave_caps bus width helpers Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:30 ` Frank Li
2026-07-30 14:23 ` [PATCH 8/9] spi: dw: " Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 14:43 ` sashiko-bot
2026-07-30 19:31 ` Frank Li
2026-07-30 14:23 ` [PATCH 9/9] dmaengine: Drop legacy bus width fields from dma_slave_caps Nuno Sá via B4 Relay
2026-07-30 14:23 ` Nuno Sá
2026-07-30 19:34 ` Frank Li
2026-08-03 12:38 ` Nuno Sá
2026-07-30 19:05 ` [PATCH 0/9] dmaengine: Support bus widths of 32 bytes and above Frank Li
2026-07-31 15:34 ` Nuno Sá
2026-07-31 15:51 ` Frank Li
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=anCMRfZDO7y5gmtU@nsa \
--to=noname.nuno@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.