ntb.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Guo Zhengkui <guozhengkui@vivo.com>, Jon Mason <jdmason@kudzu.us>,
	Allen Hubbe <allenbh@gmail.com>,
	Yang Li <yang.lee@linux.alibaba.com>,
	Alexander Fomichev <fomichev.ru@gmail.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	"open list:NTB DRIVER CORE" <ntb@lists.linux.dev>,
	open list <linux-kernel@vger.kernel.org>
Cc: zhengkui_guo@outlook.com
Subject: Re: [PATCH] ntb_perf: fix doubletest cocci warning
Date: Tue, 19 Apr 2022 08:37:28 -0700	[thread overview]
Message-ID: <d8240552-acea-0214-a5a3-6bf07ad6b007@intel.com> (raw)
In-Reply-To: <20220419071855.23338-1-guozhengkui@vivo.com>


On 4/19/2022 12:18 AM, Guo Zhengkui wrote:
> `!data->ops.init` has been repeated triple. The original logic is to
> check whether `.init`, `.run` and `.clear` callbacks are NULL or not.
>
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>


> ---
>   drivers/ntb/test/ntb_perf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/ntb/test/ntb_perf.c b/drivers/ntb/test/ntb_perf.c
> index c106c3a5097e..dcae4be91365 100644
> --- a/drivers/ntb/test/ntb_perf.c
> +++ b/drivers/ntb/test/ntb_perf.c
> @@ -1451,7 +1451,7 @@ static void perf_ext_lat_work(struct work_struct *work)
>   {
>   	struct perf_ext_lat_data *data = to_ext_lat_data(work);
>   
> -	if (!data->ops.init || !data->ops.init || !data->ops.init) {
> +	if (!data->ops.init || !data->ops.run || !data->ops.clear) {
>   		struct perf_ctx *perf = data->perf;
>   
>   		data->status = -EFAULT;

  reply	other threads:[~2022-04-19 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  7:18 [PATCH] ntb_perf: fix doubletest cocci warning Guo Zhengkui
2022-04-19 15:37 ` Dave Jiang [this message]
2022-04-19 15:49 ` Logan Gunthorpe
2022-04-20  8:46   ` Alexander Fomichev

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=d8240552-acea-0214-a5a3-6bf07ad6b007@intel.com \
    --to=dave.jiang@intel.com \
    --cc=allenbh@gmail.com \
    --cc=fancer.lancer@gmail.com \
    --cc=fomichev.ru@gmail.com \
    --cc=guozhengkui@vivo.com \
    --cc=jdmason@kudzu.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntb@lists.linux.dev \
    --cc=yang.lee@linux.alibaba.com \
    --cc=zhengkui_guo@outlook.com \
    /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).