Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1336935imu; Tue, 20 Nov 2018 16:04:14 -0800 (PST) X-Google-Smtp-Source: AFSGD/WQglzRYKre0kuAjq6aTCGMev155dfEgE0aP9yVqOTGXFfXzp+wz7Ia+iFKLQrlHkUAf7Ry X-Received: by 2002:a63:4665:: with SMTP id v37mr3919563pgk.425.1542758654299; Tue, 20 Nov 2018 16:04:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542758654; cv=none; d=google.com; s=arc-20160816; b=Avabsh0AUyfpX0vHAYPtk5GX5NwsodBOL2Rl8U9rJ+HR7gk0QLjwV8QguwaQIYQt5T yKIZIb6Zc2pJ9+wOfiCGxK2zcdfISCxUeCIfqoS8qPoX7zBeqZ3PEvhpaDBAvao7TuiD hIiWHi0pstc2b9MbHuFTU8bTp+abKuOxwjFrS+cvTl/nWv5oewr6KOIzEbToKhAyD7RZ hzZDsd1FXmXyJxyej8+SQsoRTkFigym1FPRumlq1g4CCLxZrwPaQphTOpi02eeUjCQAn YkQUCAd5Ue6ekiNshgo/WOgmJ4ERzBDrklnZPy0hBxNdeZg1ie/m5kWArjLY5rKsS3oG movA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=305zTaF0uL6fHuBiwcN0UPj/qclzfjdZl8Wuus47aFg=; b=dZ4/aK7KW6WIRUr0Rm8Z9JiOnyL5AP/OqyrGpQ1ppz2iVKqA2091zUY+/jOjrSO9Zt 41O9kG4LfPotYDO134VoM++AvZskkUHML/UTb5lHnTw7zppNZH6JumKkAdDrcdQJool6 xX3HsEgG8ciU/jqn/FTIP1V6QSvABCQMCNsqRLqlauQfoXlr8zz6R+xqgvf7mUhkBPlm BfWO/S515yDnF2q4I9ukKFPZwFgNxYaLEZE/Bjb3mHSa+kVEtFU3o6+8CnHRjjCPHqVe pk4OKj5xDNJ2XgrU5sxp2bwUkhYuV25St7C8XxnBi35aQ1UMw0+WEm8XTcPN+Csfb7ls HJbw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si42793234pgs.264.2018.11.20.16.03.58; Tue, 20 Nov 2018 16:04:14 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726993AbeKUKfJ (ORCPT + 99 others); Wed, 21 Nov 2018 05:35:09 -0500 Received: from mga02.intel.com ([134.134.136.20]:21684 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbeKUKfJ (ORCPT ); Wed, 21 Nov 2018 05:35:09 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Nov 2018 16:03:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,259,1539673200"; d="asc'?scan'208";a="87476039" Received: from hsismaet-mobl.amr.corp.intel.com ([10.254.47.201]) by fmsmga007.fm.intel.com with ESMTP; 20 Nov 2018 16:03:19 -0800 Message-ID: <95340aa60ea9a19a5c216e5863a368f05dbfeebd.camel@intel.com> Subject: Re: [PATCH net-next] e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait From: Jeff Kirsher To: YueHaibing , davem@davemloft.net Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Date: Tue, 20 Nov 2018 16:03:18 -0800 In-Reply-To: <20181119124819.15860-1-yuehaibing@huawei.com> References: <20181119124819.15860-1-yuehaibing@huawei.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-swPMXqxaQYbFeXqr8aqX" User-Agent: Evolution 3.30.2 (3.30.2-2.fc29) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-swPMXqxaQYbFeXqr8aqX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2018-11-19 at 20:48 +0800, YueHaibing wrote: > Fix a static code checker warning: > drivers/net/ethernet/intel/e100.c:1349 > e100_load_ucode_wait() warn: passing zero to 'PTR_ERR' >=20 > Signed-off-by: YueHaibing > --- > drivers/net/ethernet/intel/e100.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) This looks fine, I am just concerned of the regression testing needed on hardware that is almost 20 years old now. The availability of the hardware for testing is also a concern. > diff --git a/drivers/net/ethernet/intel/e100.c > b/drivers/net/ethernet/intel/e100.c > index 7c4b554..736115b 100644 > --- a/drivers/net/ethernet/intel/e100.c > +++ b/drivers/net/ethernet/intel/e100.c > @@ -1345,8 +1345,8 @@ static inline int e100_load_ucode_wait(struct nic > *nic) > =20 > fw =3D e100_request_firmware(nic); > /* If it's NULL, then no ucode is required */ > - if (!fw || IS_ERR(fw)) > - return PTR_ERR(fw); > + if (IS_ERR_OR_NULL(fw)) > + return PTR_ERR_OR_ZERO(fw); > =20 > if ((err =3D e100_exec_cb(nic, (void *)fw, e100_setup_ucode))) > netif_err(nic, probe, nic->netdev, --=-swPMXqxaQYbFeXqr8aqX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiTyZWz+nnTrOJ1LZ5W/vlVpL7c4FAlv0oMcACgkQ5W/vlVpL 7c53jg/+IpV9nKJj11Q61TYAO0YFR8tGCy5DZcLzL09iXoIOVd4CM7Qjy9t6B5sY 7pt/dxfbSMESY2fNLuJogms8z5r73+OMV9h+SqYM+XChNgaoVm0uQI+yY3VCI3KE FAzig6iSknwI+9/xjGCpkt2nsNz5nggNigE03tVjDqe5AOLVTNyaDc+gD+zwuY+Q XaxSzI0cNeTG482zYk4B0nPXSFnYVyhSsAO5nu2DnJd1b52cE8nydjIsJvlDfSrs TUbphLOuWwrw7Fa7nF8Ihv0RXQk0xwynv1mfG+4tchovRBwJzMHe856A0aP0WNJk TF51zQh4y0dbq2twyR0bd8Jwuiz7Of7N1DvdvjQSuF7kfylFVZgpzs2moqOBUZsj mAPa1733eG2WK8pX9q+NJWgYpp+XkFzy4HiKOawaSNFbNvBqMo8nQxicSwitBQ2+ NNu0WHWWP90cCx8xa5HDH9RSffoTWMa3S6kAaPDQPR9ji2F3+vuy/9Fgoqxxzq2t 3cMWhkwxzqDaRzpdlqqZomVqgReHllhqP797opcxDFd2IvD5tDWetmZplz2q2LvC E/be2Ly8HeRuh87x5HQXlRuXsCKP9AcYkaPjHzNxlsBfo/2RUGA3aXITA8cCoVQ6 uETNT+2mVedS8NMoTh0w9ABRUbg4ywiTKHHzHB5b0SrD94J4WRI= =xXR/ -----END PGP SIGNATURE----- --=-swPMXqxaQYbFeXqr8aqX--