Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1903437ybb; Thu, 9 Apr 2020 11:09:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKl0vcU9BAtQKNTUKeFL4MKsFH6Cn30t6JI0tzgHkGPesnRcN0Ate1uOepRUe7jT4wy3A2h X-Received: by 2002:a05:620a:16c7:: with SMTP id a7mr44392qkn.337.1586455768285; Thu, 09 Apr 2020 11:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586455768; cv=none; d=google.com; s=arc-20160816; b=nUPzWtIYGyOHdli3wk+De4c+82C6D4rmCqC1An5EpPoY6vH5qqwWREVGKLEI+pz4A9 VQNZ8y3iTTDumnrWw+xho0ryRj+01vxBnmqTtS43nJmKVmkYDltbeK37e3ls5TPqcS1H G9pmZoMmNLgAUknW0VnocG1lCxTysnRh3NAy2TCEMtrl5sZosRf1HC1A67CwaQALSCpA uzjW7GLLlY1RVfl2oGEIMRFF0ceCo2ruHIbDVvevxYN7CD1b7uwEU/vhmp67kE6ZLMec IQG/XBv9rusJcFZGVoPwAPgPQyzOD62mMYuLEbs2rGvXPiqLmdw/Hl0PPNtbDoIN0VQ4 oQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hVNFV4c+yUnUg1gad2ULWcx32+P02jEWW63/ly1Ye2Q=; b=cPLBCSBzfkdMZhzWvPe/yj77K1oOJDyVtpyw672ilYECLrk/WVekQbZNRVm/wDdtbp Md/ryOzkHOWbggUbZTwod/DCJMVc20thlSQDiDQKcWfU/r5Tguh/LVY7mK3frXeoD4sv 7BmOyhRN0/rWxJWxBjXpr3E+/AvlMlo8QUXcYBf723cOM7icRqzKmeBL64N35YSEWQrx Jeh4sW865eYDbJ1Lmi7VyvX5k8G+2n5uMvf07kgs3DPBZwtUdpCO20gj+xx7FPrdgg7G +JrtBTpWW8L88ETL6k9dWIFdBQ+mTX/yqC0qGhjVmv6Bak3ICeVSZ4kkKM3R4GkEzkf0 CXFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=yAHPtbcq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n82si4741856qkn.80.2020.04.09.11.09.12; Thu, 09 Apr 2020 11:09:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kudzu-us.20150623.gappssmtp.com header.s=20150623 header.b=yAHPtbcq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726680AbgDISIf (ORCPT + 99 others); Thu, 9 Apr 2020 14:08:35 -0400 Received: from mail-qv1-f68.google.com ([209.85.219.68]:39125 "EHLO mail-qv1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726669AbgDISIf (ORCPT ); Thu, 9 Apr 2020 14:08:35 -0400 Received: by mail-qv1-f68.google.com with SMTP id v38so5970599qvf.6 for ; Thu, 09 Apr 2020 11:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kudzu-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hVNFV4c+yUnUg1gad2ULWcx32+P02jEWW63/ly1Ye2Q=; b=yAHPtbcqZ0FZocy5p9sO42wds+5ncDpNQ08Pm98WaI/o38tmnrBThIuHlxZgPAgKY+ brM0HKmsBcdT/hJ7pcgoDkh3FgWIc0wXo+Zle+P4WpPDqPlq8cSKoB5wWu/ptjqsMN07 /StGC6vTnjWXf059I68FRn1pL6qFlfr23WbqwCRSCs8OfhYSzRfIbQKqCDxTV4hb0aY7 r6KrsqnUpfS84I0jmMJjIdYt8sicNYDptPqhxWzEHGNNfn18BoOEqQnKrN9+xHiIVhqp fjFqq5+98wLzvln8594fOywPKHVn0FNijgM8mJAG2HAziQD3JTkCHiBe21AkW9w/Z5NU 0W7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hVNFV4c+yUnUg1gad2ULWcx32+P02jEWW63/ly1Ye2Q=; b=s87PLFWwZnWRNb8kLJF31jThQ+fjCGyGnI8eOPXIv6unb98slYyPegblLH4iWJLnIJ NHWb2FJQ3fYMs8nEEykB08e4me/hFwShnjR+jm8KhhAyr9CZNrrL3hrJf4fXw6fGZMIH KyV7qVsILfE+HFiAZxKQXhcwhMxIH/UhcoJq9obgHzjq/hkcgxSOJypQLXiDW3eQTUQB ftu7WJGL53Lc4IlSDC2xRVe/zo4hjKz3IeAARhiTS/UA8HkHfyvrQkUKmoBVklHiPgtM RMEC57TUmYtRTtrsDGAGMg+c1q4y7G4FynB+xafSYjnBPvVhR6/Yo8SIyFEXnuWgpFx8 Bpuw== X-Gm-Message-State: AGi0Puam97sZoXultdZMQw04aT2A7H3ZbRgX8zowqPVHyxY+ltMFq0Mv ApfNAc+YfGOge52vR0oWIcvY0w== X-Received: by 2002:ad4:46d4:: with SMTP id g20mr1320558qvw.179.1586455714774; Thu, 09 Apr 2020 11:08:34 -0700 (PDT) Received: from kudzu.us ([2605:a601:a664:2e00:d75:1977:59a2:75ff]) by smtp.gmail.com with ESMTPSA id u29sm20178455qkm.102.2020.04.09.11.08.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 11:08:34 -0700 (PDT) Date: Thu, 9 Apr 2020 14:08:32 -0400 From: Jon Mason To: Jiasen Lin 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 Message-ID: <20200409180831.GB21666@kudzu.us> References: <1586416284-3246-1-git-send-email-linjiasen@hygon.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586416284-3246-1-git-send-email-linjiasen@hygon.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Jiasen Lin 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.