From: Vinod Koul <vkoul@kernel.org>
To: "Sia, Jee Heng" <jee.heng.sia@intel.com>
Cc: Colin King <colin.king@canonical.com>,
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][next] dmaengine: dw-axi-dmac: remove redundant null check on desc
Date: Mon, 8 Feb 2021 17:39:07 +0530 [thread overview]
Message-ID: <20210208120907.GD879029@vkoul-mobl.Dlink> (raw)
In-Reply-To: <CO1PR11MB502607E4DB3DD971956D6CF2DAB39@CO1PR11MB5026.namprd11.prod.outlook.com>
On 04-02-21, 00:18, Sia, Jee Heng wrote:
> The code looks good to me. I have also verified it on Intel KeemBay platform.
>
> Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com>
> Tested-by: Sia Jee Heng <jee.heng.sia@intel.com>
Please *do not* top post!
>
> Thanks
> Regards
> Jee Heng
> > -----Original Message-----
> > From: Colin King <colin.king@canonical.com>
> > Sent: 03 February 2021 9:47 PM
> > To: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>; Vinod Koul
> > <vkoul@kernel.org>; Sia, Jee Heng <jee.heng.sia@intel.com>; Andy
> > Shevchenko <andriy.shevchenko@linux.intel.com>;
> > dmaengine@vger.kernel.org
> > Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> > Subject: [PATCH][next] dmaengine: dw-axi-dmac: remove redundant
> > null check on desc
> >
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The pointer desc is being null checked twice, the second null check is
> > redundant because desc has not been re-assigned between the checks.
> > Remove the redundant second null check on desc.
> >
> > Addresses-Coverity: ("Logically dead code")
> > Fixes: ef6fb2d6f1ab ("dmaengine: dw-axi-dmac: simplify descriptor
> > management")
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> > drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > index ac3d81b72a15..d9e4ac3edb4e 100644
> > --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > @@ -919,10 +919,6 @@ dma_chan_prep_dma_memcpy(struct
> > dma_chan *dchan, dma_addr_t dst_adr,
> > num++;
> > }
> >
> > - /* Total len of src/dest sg == 0, so no descriptor were
> > allocated */
> > - if (unlikely(!desc))
> > - return NULL;
> > -
> > /* Set end-of-link to the last link descriptor of list */
> > set_desc_last(&desc->hw_desc[num - 1]);
> > /* Managed transfer list */
> > --
> > 2.29.2
>
--
~Vinod
next prev parent reply other threads:[~2021-02-08 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 13:46 [PATCH][next] dmaengine: dw-axi-dmac: remove redundant null check on desc Colin King
2021-02-04 0:18 ` Sia, Jee Heng
2021-02-08 12:09 ` Vinod Koul [this message]
2021-02-08 12:10 ` Vinod Koul
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=20210208120907.GD879029@vkoul-mobl.Dlink \
--to=vkoul@kernel.org \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=dmaengine@vger.kernel.org \
--cc=jee.heng.sia@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.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