Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3365106pxj; Mon, 7 Jun 2021 08:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRu4kB+/mP8ccFSDyGV5g8i7zy9QzOTwyJISsZmEY2oI90AudIxmarbGpgaP5rGGKBeteq X-Received: by 2002:a05:6402:14d8:: with SMTP id f24mr11778324edx.79.1623081183118; Mon, 07 Jun 2021 08:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623081183; cv=none; d=google.com; s=arc-20160816; b=pZ0+TZeCmZzMmI2TO+hl4d4FPvPIrlqaoge3G9eB/ve6KCqxOto+5cFhjFvg4e9vUt 70cHelo4Xa/IRd9SWStvX9Z7SCmwF+dafk6uP62WiWEC6RwfJc7JHfRiyxbz2ocFcH+b rDTDBQsYPLxonVor/dlKrD1OLV5dDjHJTovfaZG+UoTTWgBCBrwJYY8+gkW0T2O8+wsL 6xc+t2+v386mJL25r8jTgBgxW0D1SvGuRw6g0M/g9lAgn0g129b/Bn+/pnq4KqGNxKYF luj3l7WKiGCOMxwK19PRbWyIczSd/ZeVS60DXc172hhrlUOGbx2CyjwJscOpHI7+/NzK DqnA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:dkim-signature; bh=4claKpMmrc3WERETeGcJn3zlM3eZGEqhAb7GXJGJFUo=; b=HvM72N4WQzHCQa14+EG9f+Q4NAn0AKypDMKZgQZxCDN6dpUvenhXTS2O/KE8/M3JC7 HzWTPTke05g/QY2HIFBLQ73b/AnmRVvq18W2CCUYGtn4dhhjSKEpSTHQMF/w6RqMC+SU W8pNUR8D7zxwDNKSedxIWPloTJ1hLf+LmEfY1s9QKIkX27fR+n/Vdz6L9tfyvaWSB2fk 0jkGvmfCcOI9u/qPtwsvn61BBK9mE5iQWaKKnXOr4Q4pjVhtTFPQIcFc65Rv5eYGkwpq m4dYAEW4P3pqx0FiuCRF4TkEFnwBdOxr0u8WzkqTLGMfVX4qcjiNc1GAacUr0kmTHlhw VJMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=KZWC9QwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si14384908eji.655.2021.06.07.08.52.38; Mon, 07 Jun 2021 08:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@deltatee.com header.s=20200525 header.b=KZWC9QwJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbhFGPxX (ORCPT + 99 others); Mon, 7 Jun 2021 11:53:23 -0400 Received: from ale.deltatee.com ([204.191.154.188]:34814 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhFGPxX (ORCPT ); Mon, 7 Jun 2021 11:53:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=deltatee.com; s=20200525; h=Subject:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:content-disposition; bh=4claKpMmrc3WERETeGcJn3zlM3eZGEqhAb7GXJGJFUo=; b=KZWC9QwJwXpfgtO5Pbi3C9D6hb w11CbVtyoLTNY4knF7tXLjbD/o7MNV+jWLeuskQttepQzBMACKANLRFixONav89MRxs1Aj7B0hB0i UbZ84dUhdqdru1DM4RH0WiFkMpiG0CoMyU8AuzmQ+tqo3wW6T3MqYCBf6yu5mNOcetgcr6LYkGQSE 0Mj6fXWcTHtUrOihiZY2CvwSsLWH87mSM+12tsJWiEhLDxsj/IF/0Wntne326JZheqbRgDQKV2EzM impwF2yhSiymE+ol95TbQI1wJ15n6l3TeGpDsRDTAK5m72EFVAzAg+bauotvry21XSO2N4vfaVMi8 CYooDmUg==; Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.92) (envelope-from ) id 1lqHXG-0007rq-Up; Mon, 07 Jun 2021 09:51:31 -0600 To: Yang Li , jdmason@kudzu.us Cc: dave.jiang@intel.com, allenbh@gmail.com, linux-ntb@googlegroups.com, linux-kernel@vger.kernel.org References: <1623045380-125394-1-git-send-email-yang.lee@linux.alibaba.com> From: Logan Gunthorpe Message-ID: <9182a6e0-541b-e350-d760-06623cb06855@deltatee.com> Date: Mon, 7 Jun 2021 09:51:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <1623045380-125394-1-git-send-email-yang.lee@linux.alibaba.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: linux-kernel@vger.kernel.org, linux-ntb@googlegroups.com, allenbh@gmail.com, dave.jiang@intel.com, jdmason@kudzu.us, yang.lee@linux.alibaba.com X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH v2] NTB: Fix an error code in ntb_msit_probe() X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-06-06 11:56 p.m., Yang Li wrote: > When the value of nm->isr_ctx is false, the value of ret is 0. > So, we set ret to -ENOMEM to indicate this error. > > Clean up smatch warning: > drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing > error code 'ret'. > > Reported-by: Abaci Robot > Signed-off-by: Yang Li Thanks! Reviewed-by: Logan Gunthorpe > --- > > Change in v2: > --revise typo > > drivers/ntb/test/ntb_msi_test.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/ntb/test/ntb_msi_test.c b/drivers/ntb/test/ntb_msi_test.c > index 7095ecd..4e18e08 100644 > --- a/drivers/ntb/test/ntb_msi_test.c > +++ b/drivers/ntb/test/ntb_msi_test.c > @@ -369,8 +369,10 @@ static int ntb_msit_probe(struct ntb_client *client, struct ntb_dev *ntb) > if (ret) > goto remove_dbgfs; > > - if (!nm->isr_ctx) > + if (!nm->isr_ctx) { > + ret = -ENOMEM; > goto remove_dbgfs; > + } > > ntb_link_enable(ntb, NTB_SPEED_AUTO, NTB_WIDTH_AUTO); > >