From: Peng Fan <peng.fan@oss.nxp.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 3/3] dmaengine: imx-sdma: Use __assign_bit() for ownership configuration
Date: Fri, 25 Sep 2026 09:45:01 +0800 [thread overview]
Message-ID: <arXSHcT8uVF8Aw3d@nxa18884-linux-1.ap.freescale.net> (raw)
In-Reply-To: <arWJBi8iHhaeNfcr@lizhi-Precision-Tower-5810>
Hi Frank,
On Thu, Sep 24, 2026 at 04:33:10PM -0400, Frank Li wrote:
>On Thu, Sep 03, 2026 at 10:16:14PM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Replace the if/else pairs of __set_bit()/__clear_bit() in
>> sdma_config_ownership() with __assign_bit(), which does exactly the
>> same conditional set-or-clear in a single call.
>>
>> No functional change.
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>
>Reviewed-by: Frank Li <Frank.Li@nxp.com>
Drop this patch.
[1] is the new patch to cover all in dmaengine subsystem.
[1] https://lore.kernel.org/all/arV6S-U-ArZubwka@lizhi-Precision-Tower-5810/
Thanks
Peng
>
>> drivers/dma/imx-sdma.c | 17 +++--------------
>> 1 file changed, 3 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
>> index 63261ab6402b9..da565409beaaa 100644
>> --- a/drivers/dma/imx-sdma.c
>> +++ b/drivers/dma/imx-sdma.c
>> @@ -710,20 +710,9 @@ static int sdma_config_ownership(struct sdma_channel *sdmac,
>> mcu = readl_relaxed(sdma->regs + SDMA_H_HOSTOVR);
>> dsp = readl_relaxed(sdma->regs + SDMA_H_DSPOVR);
>>
>> - if (dsp_override)
>> - __clear_bit(channel, &dsp);
>> - else
>> - __set_bit(channel, &dsp);
>> -
>> - if (event_override)
>> - __clear_bit(channel, &evt);
>> - else
>> - __set_bit(channel, &evt);
>> -
>> - if (mcu_override)
>> - __clear_bit(channel, &mcu);
>> - else
>> - __set_bit(channel, &mcu);
>> + __assign_bit(channel, &dsp, !dsp_override);
>> + __assign_bit(channel, &evt, !event_override);
>> + __assign_bit(channel, &mcu, !mcu_override);
>>
>> writel_relaxed(evt, sdma->regs + SDMA_H_EVTOVR);
>> writel_relaxed(mcu, sdma->regs + SDMA_H_HOSTOVR);
>>
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2026-09-25 1:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 14:16 [PATCH 0/3] dmaengine: Use non-atomic bit ops where safe Peng Fan (OSS)
2026-09-03 14:16 ` [PATCH 1/3] dmaengine: Use non-atomic bit ops for cap_mask manipulation Peng Fan (OSS)
2026-09-03 14:20 ` sashiko-bot
2026-09-03 14:16 ` [PATCH 2/3] dmaengine: imx-sdma: Use non-atomic __set_bit() for event_mask setup Peng Fan (OSS)
2026-09-03 14:23 ` sashiko-bot
2026-09-03 14:16 ` [PATCH 3/3] dmaengine: imx-sdma: Use __assign_bit() for ownership configuration Peng Fan (OSS)
2026-09-03 14:22 ` sashiko-bot
2026-09-24 20:33 ` Frank Li
2026-09-25 1:45 ` Peng Fan [this message]
2026-09-03 19:29 ` [PATCH 0/3] dmaengine: Use non-atomic bit ops where safe Frank Li
2026-09-04 2:08 ` Peng Fan
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=arXSHcT8uVF8Aw3d@nxa18884-linux-1.ap.freescale.net \
--to=peng.fan@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=s.hauer@pengutronix.de \
--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.