From: Khairul Anuar Romli <karom.9560@gmail.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Markus.Elfring@web.de, Khairul Anuar Romli <karom.9560@gmail.com>
Subject: [PATCH 3/3] dmaengine: dw-axi-dmac: use logical NOT for NULL check on of_channels
Date: Sat, 28 Mar 2026 10:56:57 +0800 [thread overview]
Message-ID: <20260328025706.52722-4-karom.9560@gmail.com> (raw)
In-Reply-To: <20260328025706.52722-1-karom.9560@gmail.com>
checkpatch.pl --strict reports a CHECK warning in dw-axi-dmac.c:
CHECK: Comparison to NULL could be written "!of_channels"
Refactor the check for 'of_channels' to use the more idiomatic
'!of_channels' instead of an explicit comparison to NULL.
Fixes: 06b6e88c7ecf ("dmaengine: axi-dmac: wrap entire dt parse in a function")
Signed-off-by: Khairul Anuar Romli <karom.9560@gmail.com>
---
drivers/dma/dma-axi-dmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index 49e59a534e22..1fb387e9338c 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -1056,7 +1056,7 @@ static int axi_dmac_parse_dt(struct device *dev, struct axi_dmac *dmac)
struct device_node *of_channels __free(device_node) = of_get_child_by_name(dev->of_node,
"adi,channels");
- if (of_channels == NULL)
+ if (!of_channels)
return -ENODEV;
for_each_child_of_node_scoped(of_channels, of_chan) {
--
2.43.0
prev parent reply other threads:[~2026-03-28 2:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 2:56 [PATCH 0/3] dmaengine: axi-dmac: Coding style cleanups Khairul Anuar Romli
2026-03-28 2:56 ` [PATCH 1/3] dmaengine: dw-axi-dmac: fix Alignment should match open parenthesis Khairul Anuar Romli
2026-03-28 2:56 ` [PATCH 2/3] dmaengine: dw-axi-dmac: fix Lines should not end with a '(' warning Khairul Anuar Romli
2026-03-28 2:56 ` Khairul Anuar Romli [this message]
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=20260328025706.52722-4-karom.9560@gmail.com \
--to=karom.9560@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=Markus.Elfring@web.de \
--cc=dmaengine@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox