Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp417705pxb; Thu, 21 Apr 2022 02:31:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZZOXF62aa6eIr9JRfdyGyXcMufzN3IKvF+gNwLxyTSh4s8Bo41hdqH1dLKPX0yASWmF9P X-Received: by 2002:a05:6a00:15c4:b0:50a:7fec:c656 with SMTP id o4-20020a056a0015c400b0050a7fecc656mr18243195pfu.62.1650533496192; Thu, 21 Apr 2022 02:31:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650533496; cv=none; d=google.com; s=arc-20160816; b=MDqOzn3wXE1584ASHpeXtYIspu+sIrhz6O/Zm1mCDotH7ykiIgKmbTkX0gIKcXqbcO WoaUtlfMGT/Q4xCWuW9RFlcwAOve7DjNAMOOsSOHMhy/Iaovr3NcVtggNPOqFP1Fucmn R4r7DqdAZQ9CofesvUNuCPHU2f0blKqrgk21GxYwOmCGEL6nB6eQPiDYM7nHP3q90HO3 9+9uBAqMJpaDBj0n8+w+ZP9OhtMltygANlxIztL9OKJuHVWGSOtruQdwx1Y4jaEhV1hg IhbyM39hWYXz+WaGGEuIVh33naHyi0k1AsvX4Jmy+13++o0xxirj05Xcbsoccab2wXrK yGdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:in-reply-to :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=bn5gyY+3+xnocaEXQ1ub68fqvMC/+QyIGS1VbmoqLzQ=; b=C7aVFojlIJljl6Tkw3yYYmkrain0IIax8dbkOM/ge0zXzwYPQpDZ1Q3TC5CHxMyzh4 WQn/p4YqF8J0mkIP8iuO2WCrQaiG1/o7x9qI4MurVOh7rjULHtWOtTEduldWkuhxq+pG TGA2E+LwjwITZ2L1oGFF+lkooAxV4LBEBnEwPnUFY3ehFDcibAqbliwAwKCAdAIFLyg/ Dgs+Pt3ZDj0s+H4fZpDjLdbTMWAgxGT5Lne7WkHZAyxKyRQ4TEEtB0zUZVnH1rWMv+uL oXZ7eu+JOMiudmloBe9xelRectzx0Rmr/y5wkhLgLTWe/3cQ5ISt0QjyfQxKUnvKsbiZ 9iiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=JYMbw00H; 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=NONE dis=NONE) header.from=deltatee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a056a0010c600b0050aba90702dsi4517153pfu.324.2022.04.21.02.31.19; Thu, 21 Apr 2022 02:31:36 -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=@deltatee.com header.s=20200525 header.b=JYMbw00H; 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=NONE dis=NONE) header.from=deltatee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354035AbiDSPxA (ORCPT + 99 others); Tue, 19 Apr 2022 11:53:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354077AbiDSPwu (ORCPT ); Tue, 19 Apr 2022 11:52:50 -0400 Received: from ale.deltatee.com (ale.deltatee.com [204.191.154.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 799641B7A8 for ; Tue, 19 Apr 2022 08:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:From:References:Cc:To: MIME-Version:Date:Message-ID:content-disposition; bh=bn5gyY+3+xnocaEXQ1ub68fqvMC/+QyIGS1VbmoqLzQ=; b=JYMbw00HEy1svWGf07hspaVsEQ xxqaDgs+25Q9sfbTe402CuAO9HkfXNEKpLfcFKpb4fAChFXUiOwkNLh6wua7vFlS+W+kZ/dmdFidN Icr0t+fABKKCRc3zxG8FEG1u2hBnIY7LTqY15YHDKVpuUUwv7bl9Cq1N7YwRrVMqLjdHyG666Qkjd mXQaoH95+jXgftDPCiRaxs9NTsYyeYmVa2Z+CnUjFOb7L6vwk4o0tzVStv9xbRotdHo7Oq1HJlgLI siVQjwQjL5JWv9SCzj+ySXUBiO6ovIjNu+bF1Ev1sx6UO7+0fMewlC30tvEU8dMKNvMpJYrGAJFAz RylFh2zQ==; Received: from s0106a84e3fe8c3f3.cg.shawcable.net ([24.64.144.200] helo=[192.168.0.10]) by ale.deltatee.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ngq73-00BbRv-Ru; Tue, 19 Apr 2022 09:49:58 -0600 Message-ID: <7cb4d3be-925f-05bd-78fe-67a69dfee18d@deltatee.com> Date: Tue, 19 Apr 2022 09:49:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-CA To: Guo Zhengkui , Jon Mason , Dave Jiang , Allen Hubbe , Yang Li , Alexander Fomichev , Serge Semin , "open list:NTB DRIVER CORE" , open list Cc: zhengkui_guo@outlook.com References: <20220419071855.23338-1-guozhengkui@vivo.com> From: Logan Gunthorpe In-Reply-To: <20220419071855.23338-1-guozhengkui@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 24.64.144.200 X-SA-Exim-Rcpt-To: guozhengkui@vivo.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, yang.lee@linux.alibaba.com, fomichev.ru@gmail.com, fancer.lancer@gmail.com, ntb@lists.linux.dev, linux-kernel@vger.kernel.org, zhengkui_guo@outlook.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Subject: Re: [PATCH] ntb_perf: fix doubletest cocci warning X-SA-Exim-Version: 4.2.1 (built Sat, 13 Feb 2021 17:57:42 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = 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;