Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp31422pxb; Wed, 20 Apr 2022 15:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybeMCdMc737HZTuBFlOA7B9T2jKdTNWXRQYJrQ3H33Tlh8650kZ565UsYItVBwgSBgac0u X-Received: by 2002:a05:6a00:2284:b0:50a:40b8:28ff with SMTP id f4-20020a056a00228400b0050a40b828ffmr25800342pfe.17.1650492868605; Wed, 20 Apr 2022 15:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650492868; cv=none; d=google.com; s=arc-20160816; b=VFPZM4y8+xznHjyBvkzHdH+acCcfRLgCRSQadd/HcpQ/BnESSyKy6zrb5rZYdf2rvr 6ArI7ZHgkDuSnUcUxxfsh+df6VycH5f70fLOx6e7J5/m3ls3s66WO54p5Tm05VczP+5W iueOjdvxFHjV/QZ2zOLMOt15mcnQUahAae8vdb87jOZUPmxA46rrYEj8kWgbQEDQFpSG b/6f9v58pwZYb0dG0hP/Ebx9KQwVrL3uG9Z0lEbf2mUHd20XOahz3Hfe69eu39TOhUu8 hBBJtqRbk9eV5Z8crp3QegVdIaWmaCGioJIHtozXRWnjdOfW15nXBEUxMh/hCUZnQgwx BpjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QArLsIT6s7ntTWKM79ixwz9SubeDVO+01rJZYCmJhAI=; b=SkQicsHsPxZQTNf22OQyrCxkMgB/dUZK4wobBtgrfYYyBWuneY+G1L5wTSz/QWktX/ sbF5C+qRbur9sLi5SbImviCkCXqMq8L4+A+v8GraSEPy/FElp2/bhyijd6DiD1XjA2HL x+Zoi/0Ixxkjjt2b4uqoXc/MmkHvoieoTRbrxpcIfoMZkJoueEsYLJBSP2fJa6euW2uA FZgcf8kWFaxH80IgdxgdCe25ujIDu5Fra+g4qtU1VYqgiEUoaE92RdRDjZBRTxHlba7x kb0vC8bknPBfR0ajgTW7lDrNU8e7iWqdPjFf+dp5+hZNcZJujILnfwkToctU9fAB78mJ gRjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OsIBgFMw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g35-20020a632023000000b003aa127ddfc5si3555431pgg.664.2022.04.20.15.14.12; Wed, 20 Apr 2022 15:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OsIBgFMw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345095AbiDTIt2 (ORCPT + 99 others); Wed, 20 Apr 2022 04:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235189AbiDTIt1 (ORCPT ); Wed, 20 Apr 2022 04:49:27 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BFB17AB4 for ; Wed, 20 Apr 2022 01:46:41 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id r13so2055664ejd.5 for ; Wed, 20 Apr 2022 01:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=QArLsIT6s7ntTWKM79ixwz9SubeDVO+01rJZYCmJhAI=; b=OsIBgFMwkBRs8Cs9x6FSqYpOYCxffAMrLFyciN8d4alWeBg0B3naUc5D4lFt/Zy5Z9 oxz4hmz/fUARL5SRiGrU028x2VvNTvV/TBWLe1Q/FYgxlrp1wdw+oMovghLTMQBmUkoc t9MRNC/qpOZo7ivU/O8sfIN/GdojfxQ/EBbgVbG7RDOJ3Vwe3LAwR87JZD2Cxg3RtiQ+ dCnuIJnxIAwyOyoAyZBlBipC7Grg5tMl/6yhiA7djiSTZ66M/CqoiretBkcZ8n+bloU5 LY5FImBBanm5ZjvtSm4jLVzdtXO/yr2/RHHXZpsjl2SaFS3+um/PgcSfDuQC1WnNg3Ki OT6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=QArLsIT6s7ntTWKM79ixwz9SubeDVO+01rJZYCmJhAI=; b=nHOnJYrYQpWajwINij1vKbVPpjqbCKjvfaJ9HCWdO/ZE0qcPzsqu5ew/5F1w16lNz8 L1ph6qgb/TAoXCgeqmhB+wyzNnaCtsX0JB9Yr7KWXMcJF0gTrTv1Xkm+6I+FUuj/YokO F5aEECh8PYN22kgXszBZfGbLBis4uMHZzRVPiE5HduZByNDEzN9bK1n6Vro7iw8o6bCv Ev9iSskY0DUmtVuBm6t9Cf0iASUtcBJTbiS0IKFFHbse4As0038SffSo6BC/y48lGDbK irML7hY6lNfD1F1hU9zS/e3mHqioqXf29d4N9SzU9XjvuilkpIGcPhRRJFg3nbf+3KPN OO3w== X-Gm-Message-State: AOAM530MNNnAGoDoi3njBz0X3QpW97QNS1tSim/uHKPr4u4Xo6yYj4sH 4oJhJaG//DExw6d/UKZH9wCoWmR9FcNXUBNcwB4= X-Received: by 2002:a17:907:7f9f:b0:6ef:a120:4ea6 with SMTP id qk31-20020a1709077f9f00b006efa1204ea6mr13428222ejc.607.1650444400170; Wed, 20 Apr 2022 01:46:40 -0700 (PDT) MIME-Version: 1.0 References: <20220419071855.23338-1-guozhengkui@vivo.com> <7cb4d3be-925f-05bd-78fe-67a69dfee18d@deltatee.com> In-Reply-To: <7cb4d3be-925f-05bd-78fe-67a69dfee18d@deltatee.com> From: Alexander Fomichev Date: Wed, 20 Apr 2022 11:46:28 +0300 Message-ID: Subject: Re: [PATCH] ntb_perf: fix doubletest cocci warning To: Logan Gunthorpe Cc: Guo Zhengkui , Jon Mason , Dave Jiang , Allen Hubbe , Yang Li , Serge Semin , "open list:NTB DRIVER CORE" , open list , zhengkui_guo@outlook.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, nice catch. I'll include it into the next patch version. Regards, Alexander. =D0=B2=D1=82, 19 =D0=B0=D0=BF=D1=80. 2022 =D0=B3. =D0=B2 18:50, Logan Gunth= orpe : > > > > On 2022-04-19 01:18, 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 > > This appears to be a patch against Alexander's patch which has not been > accepted yet. Posting a note on his patch so he fixes it for the next > posting would be preferable. > > Logan > > > --- > > 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 =3D 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 =3D data->perf; > > > > data->status =3D -EFAULT;