From: Rosen Penev <rosenp@gmail.com>
To: dmaengine@vger.kernel.org
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] dmaengine: fsl_raid: use !desc for NULL check
Date: Sun, 27 Sep 2026 13:52:24 -0700 [thread overview]
Message-ID: <20260927205224.29640-1-rosenp@gmail.com> (raw)
<= 0 is flagged by sparse as being used for integer, not pointer
comparison. Fix the warning.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/dma/fsl_raid.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index 9cc289f7129e..8e7026682d0a 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -346,7 +346,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_genq(
}
desc = fsl_re_chan_alloc_desc(re_chan, flags);
- if (desc <= 0)
+ if (!desc)
return NULL;
if (scf && (flags & DMA_PREP_CONTINUE)) {
@@ -470,7 +470,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_pq(
src_cnt += 3;
desc = fsl_re_chan_alloc_desc(re_chan, flags);
- if (desc <= 0)
+ if (!desc)
return NULL;
/* Filling GenQQ CDB */
@@ -554,7 +554,7 @@ static struct dma_async_tx_descriptor *fsl_re_prep_dma_memcpy(
}
desc = fsl_re_chan_alloc_desc(re_chan, flags);
- if (desc <= 0)
+ if (!desc)
return NULL;
/* Filling move CDB */
--
2.55.0
next reply other threads:[~2026-09-27 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 20:52 Rosen Penev [this message]
2026-09-28 16:45 ` 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=20260927205224.29640-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--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
all inboxes | Powered by JetHome®