From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Radu Pirea <radu_nicolae.pirea@upb.ro>,
Ryan Wanner <ryan.wanner@microchip.com>,
William Zhang <william.zhang@broadcom.com>,
Kursad Oney <kursad.oney@broadcom.com>,
Jonas Gorski <jonas.gorski@gmail.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 18/19] spi: omap2-mcspi: switch to managed controller allocation
Date: Thu, 30 Apr 2026 09:12:49 +0200 [thread overview]
Message-ID: <afMA8buX6EP3pKhs@hovoldconsulting.com> (raw)
In-Reply-To: <afKisC-NX9YZhaEv@sirena.co.uk>
[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]
On Thu, Apr 30, 2026 at 09:30:40AM +0900, Mark Brown wrote:
> On Wed, Apr 29, 2026 at 11:13:32AM +0200, Johan Hovold wrote:
> > Switch to device managed controller allocation to simplify error
> > handling and to avoid having to take another reference during
> > deregistration.
>
> > @@ -1556,7 +1553,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
> > status = omap2_mcspi_request_dma(mcspi,
> > &mcspi->dma_channels[i]);
> > if (status == -EPROBE_DEFER)
> > - goto free_ctlr;
> > + return status;
> > }
>
> Here we return directly...
>
> > @@ -1604,7 +1601,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
> > pm_runtime_disable(&pdev->dev);
> > free_ctlr:
> > omap2_mcspi_release_dma(ctlr);
> > - spi_controller_put(ctlr);
>
> ...which skips the _release_dma() as well as the put - I think the label
> needs a rename and the goto keeping (or some more refactoring to also
> use devm for the DMA, but that's more work).
This works as intended since omap2_mcspi_request_dma() cleans up after
itself on failure.
I can send a follow-up renaming the error label as this is arguably not
an issue introduced by this patch even if it makes it more noticeable.
Or do you prefer a v2 (posted separately from the series)?
Johan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-04-30 7:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 9:13 [PATCH 00/19] spi: switch to managed controller allocation (part 1/3) Johan Hovold
2026-04-29 9:13 ` [PATCH 01/19] spi: at91-usart: switch to managed controller allocation Johan Hovold
2026-04-29 9:13 ` [PATCH 02/19] spi: atmel: " Johan Hovold
2026-04-29 9:13 ` [PATCH 03/19] spi: bcm63xx: " Johan Hovold
2026-04-29 9:13 ` [PATCH 04/19] spi: bcm63xx-hsspi: " Johan Hovold
2026-04-29 18:13 ` William Zhang
2026-04-29 9:13 ` [PATCH 05/19] spi: cadence: " Johan Hovold
2026-04-29 9:13 ` [PATCH 06/19] spi: octeon: " Johan Hovold
2026-04-29 9:13 ` [PATCH 07/19] spi: cavium-thunderx: " Johan Hovold
2026-04-29 9:13 ` [PATCH 08/19] spi: coldfire-qspi: " Johan Hovold
2026-04-29 9:13 ` [PATCH 09/19] spi: dln2: " Johan Hovold
2026-04-29 9:13 ` [PATCH 10/19] spi: ep93xx: " Johan Hovold
2026-04-29 9:13 ` [PATCH 11/19] spi: fsl: " Johan Hovold
2026-04-29 9:13 ` [PATCH 12/19] spi: fsl-espi: " Johan Hovold
2026-04-29 9:13 ` [PATCH 13/19] spi: img-spfi: " Johan Hovold
2026-04-29 9:13 ` [PATCH 14/19] spi: lantiq-ssc: " Johan Hovold
2026-04-29 9:13 ` [PATCH 15/19] spi: meson-spicc: " Johan Hovold
2026-04-29 9:13 ` [PATCH 16/19] spi: mxs: " Johan Hovold
2026-04-29 9:13 ` [PATCH 17/19] spi: npcm-pspi: " Johan Hovold
2026-04-29 9:13 ` [PATCH 18/19] spi: omap2-mcspi: " Johan Hovold
2026-04-30 0:30 ` Mark Brown
2026-04-30 7:12 ` Johan Hovold [this message]
2026-04-30 10:05 ` Mark Brown
2026-04-30 10:12 ` Johan Hovold
2026-04-29 9:13 ` [PATCH 19/19] spi: orion: " Johan Hovold
2026-05-04 13:09 ` (subset) [PATCH 00/19] spi: switch to managed controller allocation (part 1/3) Mark Brown
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=afMA8buX6EP3pKhs@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=broonie@kernel.org \
--cc=jonas.gorski@gmail.com \
--cc=kursad.oney@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=radu_nicolae.pirea@upb.ro \
--cc=ryan.wanner@microchip.com \
--cc=william.zhang@broadcom.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 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.