From: Frank Li <Frank.li@oss.nxp.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: dmaengine@vger.kernel.org, Vinod Koul <vkoul@kernel.org>,
Frank Li <Frank.Li@kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dmaengine: fsl_raid: use !desc for NULL check
Date: Mon, 28 Sep 2026 11:45:19 -0500 [thread overview]
Message-ID: <arqZn04xRO3L4dxE@SMW015318> (raw)
In-Reply-To: <20260927205224.29640-1-rosenp@gmail.com>
On Sun, Sep 27, 2026 at 01:52:24PM -0700, Rosen Penev wrote:
> <= 0 is flagged by sparse as being used for integer, not pointer
> comparison. Fix the warning.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.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
>
prev parent reply other threads:[~2026-09-28 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 20:52 Rosen Penev
2026-09-28 16:45 ` Frank Li [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=arqZn04xRO3L4dxE@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rosenp@gmail.com \
--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®