Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp838423pxb; Fri, 22 Apr 2022 12:15:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxXy8oiBxXV3I67FzeW71O7NEBfBCsdeIFQYr1SrK98CpbibBD775lzn5SorkDui1XOBqk X-Received: by 2002:a17:90b:3843:b0:1d2:b8f8:ecc8 with SMTP id nl3-20020a17090b384300b001d2b8f8ecc8mr6927496pjb.218.1650654956745; Fri, 22 Apr 2022 12:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654956; cv=none; d=google.com; s=arc-20160816; b=L66SQeU2CnXPcn7aIlSGHak2mPkn+KOe1VmcrbxP5FIrKzga6DsI6eyQpcM/i8C8hN PYs30MjSg7WZ5yxAxQIOgsb+lTSGhV6MKAMa2MwEoH9pXP53onOvIcE7HyAaZMfHNstM wV1hbk7zDnIJc/1eQQZ5J7/DYCij0/877986P/RWz6cyQm+jSm2xrPlnp2Hg9jBe5kfH gN4jylFE1yodug0mf3g/jYvHsdJS5BG5O7qMlVjxMJPYTO43gEl3Ps9T8ug8hyzauHMC rTG8QKSJjWIx+sT5c3J3AizTyF4ae7QUklDK6WH6YlQ/Eyw4Uqc8XFU1g1aA7Vl3O5D1 EnNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eJMAKrBj0BFQyiRt3ZO9KFKGgv5yEiWnPt64f12a58k=; b=k7PGuRbuVkMcqvSELT75Ab+pnfTYJcoFbTJAyU5yRQ1cSpCrO3QuMWx39fhbSHcNWH BbpqlvK+I/maE4vs2BXHLcTrKmbKFd+3TzKujOhIyU5XPWiqXJWp4e3xDzV5f+UUGi5f e0RLCmoDbjuC7ClV3pw46jgxS0ot+q5jBeJpXqMa8AYMo5UU1eGsc89vBErEapUAKcpr 6ZVkrSN7sViAhtJtcR5GcezvPfqSfzdDjEergaHxXHRlpCF5GIlvfQK8K+lkii+cuffU /2ls6REF9JjJMyi94UU8kbc3D2D4TaULNh42sI18uWHAPdeW5lHAYlqtMFTd7hSzcbDp U4wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=g1pNkLIp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w3-20020a170902e88300b00156ef408753si9256964plg.238.2022.04.22.12.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:15:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=g1pNkLIp; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5D88814EC5A; Fri, 22 Apr 2022 11:31:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353929AbiDSPkO (ORCPT + 99 others); Tue, 19 Apr 2022 11:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239268AbiDSPkN (ORCPT ); Tue, 19 Apr 2022 11:40:13 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3714017040 for ; Tue, 19 Apr 2022 08:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650382650; x=1681918650; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=4N2SkFIST0VyNGwkWWx2ut7F+Xkhd+EsUCbxFRceHsA=; b=g1pNkLIpqnXqyzRdia/1gijCdPuOhgj3cDFzIS8sv4wFFay7MlInQ3dQ eiGq+N5A/KOcrPBU8aYO+SzH+FnOZU4TwxXW8kjD7rcAYr+zFIdD95VL6 vRe9rBx1C5fvxfzraE+pIIwWNh1I02J7zl2glOTgWadZPynijj+Uj7yT/ PmNqzwUK+pQawMK192HUePlQTQV3EDClKHoL/rvrtSYeUY8Xn4xn1gRYV 8Ng+oJ71nTBcXkO/ZQbDbNyWJThvSUIRyqUPc/T4NcEsw1HVZdfT0lMIF ZJp8LIjOBThxtWfXDELJb7f0zKnEDov7R2H+lZUrI/m7uh8F5DzP/btxd w==; X-IronPort-AV: E=McAfee;i="6400,9594,10322"; a="326694709" X-IronPort-AV: E=Sophos;i="5.90,273,1643702400"; d="scan'208";a="326694709" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 08:37:29 -0700 X-IronPort-AV: E=Sophos;i="5.90,273,1643702400"; d="scan'208";a="727110814" Received: from djiang5-mobl1.amr.corp.intel.com (HELO [10.212.111.34]) ([10.212.111.34]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2022 08:37:29 -0700 Message-ID: Date: Tue, 19 Apr 2022 08:37:28 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] ntb_perf: fix doubletest cocci warning Content-Language: en-US To: Guo Zhengkui , Jon Mason , 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: Dave Jiang In-Reply-To: <20220419071855.23338-1-guozhengkui@vivo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 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 Reviewed-by: Dave Jiang > --- > 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;