From: Mark Brown <broonie@kernel.org>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
Marek Szyprowski <m.szyprowski@samsung.com>,
Ijae Kim <ae878000@gmail.com>
Subject: Re: [PATCH] spi: rockchip-sfc: skip DMA cleanup in PIO mode
Date: Fri, 11 Sep 2026 19:47:51 +0100 [thread overview]
Message-ID: <aqRM17TZ0-5pd6Y0@sirena.org.uk> (raw)
In-Reply-To: <20260911172701.58177-1-mhun512@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 617 bytes --]
On Fri, Sep 11, 2026 at 01:27:01PM -0400, Myeonghun Pak wrote:
> With rockchip,sfc-no-dma, probe skips allocating and mapping the transfer
> buffer. However, controller registration failure and driver removal still
> call dma_unmap_single() for that nonexistent mapping.
> err_register:
> + if (!sfc->use_dma)
> + goto err_dma;
> dma_unmap_single(dev, sfc->dma_buffer, sfc->max_iosize,
> DMA_BIDIRECTIONAL);
Rather than adding use of goto to skip aroud within the cleanup here you
could guard the calls that need guarding with if statements, that would
look a lot less scary than jumping around like this.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-09-11 18:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 17:27 [PATCH] spi: rockchip-sfc: skip DMA cleanup in PIO mode Myeonghun Pak
2026-09-11 18:47 ` Mark Brown [this message]
2026-09-12 19:00 ` [PATCH v2] " Myeonghun Pak
2026-09-13 11:34 ` Mark Brown
2026-09-13 20:31 ` Myeonghun Pak
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=aqRM17TZ0-5pd6Y0@sirena.org.uk \
--to=broonie@kernel.org \
--cc=ae878000@gmail.com \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mhun512@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