Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp391823imu; Mon, 26 Nov 2018 23:51:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/VKkLdG5XSxOHdk7/sxMsW9TnfCdLJPP+PVD6EEtobZDoYl+bb9eGiyl+4k5VnZz3nA4YMq X-Received: by 2002:a63:2784:: with SMTP id n126mr28987106pgn.48.1543305119822; Mon, 26 Nov 2018 23:51:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543305119; cv=none; d=google.com; s=arc-20160816; b=u17ujyi/+LogkUfeR72ihm0omhT7fAam1OSesVxY0Oks1P2X5SxP+Jft3QVxYltoMT zg8T25+w/R/98z9D3ldbGN3krfqwcTSf5oyhVzzGrW95fcsT/KnsyphpaZ3BeF/jbUW5 PhjHNc30TchrQ8GnRrMVlkCfH059OXkVmOWLSb+HjbfXy73b0tR0NMi5wKgQA/XjaL4W Nqu76JR97H2QaLbloVb72Cg+a+Uve45sfVbLKo+FkOGGLzJ6BgYXlUxHAE5/J4FW3UJ8 /QeOtePnjfH2lQ43zkLs7stMEpDAg0zcpydJpejj++OinQJ7dpgMarm5YPp7trGoe3hw hkOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k2p+P7pCp3bae/1aPxTO7Cj06+aG/vXaoMDWYTHi7Us=; b=qbb+XkbsJBR6BmR4zK3A//Ak/WFHpZO3rOO7+SlER81NQp3l8EdzRFZLUg/GpHkIFY kSjtPJWohoviB40gtmQRL3wvA9iZ+CO6kQyq9ba9iq4REDbKor4mu0P/kZmKnGQCTuBp 42Pl2TdWOWfA2eWd2gDhXH7O1fTR4adv3wrvrHripkYyjptKO+difwtb8TJCgCA0u9Zw iAxmZXtn742CYZfJ3w5UDB1G7sPL+SYmnlGcJM/CDZtEaC2BCmEgHN+nM1ON7ehLR76l aeep0eesHh+crjb1zIXkv1J17fW00pgUsl4ucpg6uBcncJDsKVvTTSJ+vzkrTfckL25O aJfw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 144si2890762pga.322.2018.11.26.23.51.44; Mon, 26 Nov 2018 23:51:59 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729239AbeK0Sri (ORCPT + 99 others); Tue, 27 Nov 2018 13:47:38 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:54154 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728838AbeK0Sri (ORCPT ); Tue, 27 Nov 2018 13:47:38 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id AE23F35572CC480B9E3F; Tue, 27 Nov 2018 15:50:36 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wAR7oPTA005625; Tue, 27 Nov 2018 15:50:25 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from LIN-A6CB96A0603.zte.intra ([10.90.106.118]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018112715503971-13235280 ; Tue, 27 Nov 2018 15:50:39 +0800 From: Wen Yang To: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Wen Yang , Wen Yang Subject: [PATCH] scsi: ufs: Use PTR_ERR_OR_ZERO to replace the open coded version Date: Tue, 27 Nov 2018 15:50:25 +0800 Message-Id: <20181127075025.16018-1-wen.yang99@zte.com.cn> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-11-27 15:50:39, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-11-27 15:50:21 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn wAR7oPTA005625 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PTR=5FERR=5FOR=5FZERO has implemented the same function, so use inlined fun= ction instead of open coded equivalent. Signed-off-by: Wen Yang CC: Vinayak Holikatti CC: "James E.J. Bottomley" CC: "Martin K. Petersen" CC: linux-scsi@vger.kernel.org CC: Wen Yang CC: linux-kernel@vger.kernel.org --- drivers/scsi/ufs/ufs-hisi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/ufs/ufs-hisi.c b/drivers/scsi/ufs/ufs-hisi.c index 452e19f..6fdf059 100644 --- a/drivers/scsi/ufs/ufs-hisi.c +++ b/drivers/scsi/ufs/ufs-hisi.c @@ -514,10 +514,7 @@ static int ufs=5Fhisi=5Fget=5Fresource(struct ufs=5Fhi= si=5Fhost *host) /* get resource of ufs sys ctrl */ mem=5Fres =3D platform=5Fget=5Fresource(pdev, IORESOURCE=5FMEM, 1); host->ufs=5Fsys=5Fctrl =3D devm=5Fioremap=5Fresource(dev, mem=5Fres); - if (IS=5FERR(host->ufs=5Fsys=5Fctrl)) - return PTR=5FERR(host->ufs=5Fsys=5Fctrl); - - return 0; + return PTR=5FERR=5FOR=5FZERO(host->ufs=5Fsys=5Fctrl); } =20 static void ufs=5Fhisi=5Fset=5Fpm=5Flvl(struct ufs=5Fhba *hba) --=20 2.9.5