From: Jon Mason <jdmason@kudzu.us>
To: Jiasen Lin <linjiasen@hygon.cn>
Cc: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com,
dan.carpenter@oracle.com, allenbh@gmail.com,
dave.jiang@intel.com, zhangpanyong@hygon.cn
Subject: Re: [PATCH] NTB: Fix static check warning in perf_clear_test
Date: Thu, 9 Apr 2020 14:08:32 -0400 [thread overview]
Message-ID: <20200409180831.GB21666@kudzu.us> (raw)
In-Reply-To: <1586416284-3246-1-git-send-email-linjiasen@hygon.cn>
On Thu, Apr 09, 2020 at 12:11:24AM -0700, Jiasen Lin wrote:
> As pthr->dma_chan can't be NULL in this context, so there is
> no need to check pthr->dma_chan.
>
> Fixes: 99a06056124d ("NTB: ntb_perf: Fix address err in perf_copy_chunk")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Jiasen Lin <linjiasen@hygon.cn>
Pulled into my ntb branch.
Thanks,
Jon
> ---
> drivers/ntb/test/ntb_perf.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index 972f6d9..f73b126 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -1010,8 +1010,8 @@ static void perf_clear_test(struct perf_thread *pthr)
> pthr->perf->test_peer->dma_dst_addr,
> pthr->perf->test_peer->outbuf_size,
> DMA_FROM_DEVICE, 0);
> - if (pthr->dma_chan)
> - dma_release_channel(pthr->dma_chan);
> +
> + dma_release_channel(pthr->dma_chan);
>
> no_dma_notify:
> atomic_dec(&perf->tsync);
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "linux-ntb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-ntb+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/linux-ntb/1586416284-3246-1-git-send-email-linjiasen%40hygon.cn.
prev parent reply other threads:[~2020-04-09 18:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 7:11 [PATCH] NTB: Fix static check warning in perf_clear_test Jiasen Lin
2020-04-09 18:08 ` Jon Mason [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=20200409180831.GB21666@kudzu.us \
--to=jdmason@kudzu.us \
--cc=allenbh@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=dave.jiang@intel.com \
--cc=linjiasen@hygon.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntb@googlegroups.com \
--cc=zhangpanyong@hygon.cn \
/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;
as well as URLs for NNTP newsgroup(s).