Received: by 10.223.164.202 with SMTP id h10csp4697137wrb; Wed, 29 Nov 2017 10:20:04 -0800 (PST) X-Google-Smtp-Source: AGs4zMbsSZr6EdOq+i6+DKscK4Aji1GK4jUVv1HsB+4mI+hYEKXtVHOi5U/0jPGbL9A0j3nnbWRj X-Received: by 10.99.120.10 with SMTP id t10mr3608643pgc.393.1511979603902; Wed, 29 Nov 2017 10:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511979603; cv=none; d=google.com; s=arc-20160816; b=ulq5JI91s93tW8+xfGVCyb/AX27Gm6oCvuftqQd1a4m7H0AQOBlecE/b3BsAem9q82 ylF7nooDP540Lvc8hzdehI6LAB1Vm8RJPG/BBoWWReNujrtD6vPhRaNXZzuSPZPC1QcP 9+h0vJe8IwfhHQVPJ0sW3JR7pOPdVAbGM7fyvdRg0SQ507uIAUKLcwQtXUPwsnBuhkw0 w8bjCE6O2UnOHwsSGm1JRe9MY2hiY2RV3X9jGQRgsoUInV+NgpTr/IcSpIorBxTiYO8o 236Zb5KnigFWR2Egpg9HLZmcgRRcFB9y/ZmrVWVH5o6R+mLLHyEIIUoaRgSD7wnfsGi4 cdaA== 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:arc-authentication-results; bh=7Z1+1E8JUPMORB+pLcM0wl7FqGrqX+9GVC4NCJZHeyY=; b=QSzTbkNtPftPHMEva2Osposlu+zIZY041ini3i8MpGHtOG40ln313VdFGkfVofqzRF b8QRm2/UpByg5Vpwmugv2q3GaWbHF4M/DdnJDBIqhlpIvcm41lfDk7TV3HP3lW0BZQXo O4+qDDmjZHARgssr9bcrOhGUKZgt3hCgBNeCq49fIKc3pM8TiLSwFJznF5RQuGEaWhZV b8ZgP1+Ag/x6iJeGvMS+ByCeq5p4A4kY4VvRBp3NzgwpP38mJNXO0gxyU7SrKBN2SaRb yEV7oiNNXxLGnuPb3bsqfFTP95ScteCnv0EcBqk5YnNp0CV0NdvPyV5N3zwm7IXtyRYb iDxQ== 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=cmu.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186si1608424pgf.326.2017.11.29.10.19.53; Wed, 29 Nov 2017 10:20:03 -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=cmu.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754089AbdK2PBO (ORCPT + 69 others); Wed, 29 Nov 2017 10:01:14 -0500 Received: from SMTP.ANDREW.CMU.EDU ([128.2.105.204]:49450 "EHLO smtp.andrew.cmu.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808AbdK2PBN (ORCPT ); Wed, 29 Nov 2017 10:01:13 -0500 Received: from hedwig.ini.cmu.edu (HEDWIG.INI.CMU.EDU [128.2.16.51]) (user=somlo mech=LOGIN (0 bits)) by smtp.andrew.cmu.edu (8.15.2/8.15.2) with ESMTPSA id vATF15pY048702 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 29 Nov 2017 10:01:06 -0500 Date: Wed, 29 Nov 2017 10:01:05 -0500 From: "Gabriel L. Somlo" To: Vasyl Gomonovych Cc: mst@redhat.com, qemu-devel@nongnu.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] firmware: Use PTR_ERR_OR_ZERO() Message-ID: <20171129150105.GK5774@hedwig.ini.cmu.edu> References: <1511905227-30292-1-git-send-email-gomonovych@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511905227-30292-1-git-send-email-gomonovych@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.1 (2017-09-22) X-PMX-Version: 6.3.0.2556906, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.11.29.144816 X-SMTP-Spam-Clean: 8% ( MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, FROM_EDU_TLD 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_MSGID 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __PHISH_SPEAR_STRUCTURE_1 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NAME 0, __TO_NAME_DIFF_FROM_ACC 0, __TO_REAL_NAMES 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0) X-SMTP-Spam-Score: 8% X-Scanned-By: MIMEDefang 2.78 on 128.2.105.204 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Gabriel Somlo On Tue, Nov 28, 2017 at 10:40:27PM +0100, Vasyl Gomonovych wrote: > Fix ptr_ret.cocci warnings: > drivers/firmware/efi/efi.c:610:8-14: WARNING: PTR_ERR_OR_ZERO can be used > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > Signed-off-by: Vasyl Gomonovych > --- > drivers/firmware/qemu_fw_cfg.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c > index 5cfe39f7a45f..18489b6a696d 100644 > --- a/drivers/firmware/qemu_fw_cfg.c > +++ b/drivers/firmware/qemu_fw_cfg.c > @@ -693,10 +693,8 @@ static int fw_cfg_cmdline_set(const char *arg, const struct kernel_param *kp) > */ > fw_cfg_cmdline_dev = platform_device_register_simple("fw_cfg", > PLATFORM_DEVID_NONE, res, processed); > - if (IS_ERR(fw_cfg_cmdline_dev)) > - return PTR_ERR(fw_cfg_cmdline_dev); > > - return 0; > + return PTR_ERR_OR_ZERO(fw_cfg_cmdline_dev); > } > > static int fw_cfg_cmdline_get(char *buf, const struct kernel_param *kp) > -- > 1.9.1 > From 1585347660432402973@xxx Tue Nov 28 21:42:26 +0000 2017 X-GM-THRID: 1585347660432402973 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread