From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D492C432C0 for ; Mon, 18 Nov 2019 12:07:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A85E2067D for ; Mon, 18 Nov 2019 12:07:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iIxv4vZZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A85E2067D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MNeoV1NBEJ25hS+TbRbnNiSuUhlLf74mePDMgl0SjDI=; b=iIxv4vZZoSkLRBEX50KQ/EmyE 2c4w6droqxyY12SCOeO3o4qlGnFxUc7X4jXFs5vrCoQWMbaC0hn3gYRmxvhxNUi0JnOq7jR9PfPJZ uGEZbx30u5gm5RN/wGlItXtx28v12fF1DKVkHuj5L5wTWZiYzjVZ/H6FUiG6WlwuuQTLG/UVS7lim 7DYsebBOvEdikg65haOyD30j8F8BWO/QrveuHTHImRs3yFPkwutokENFdW97o9IimQjtYrZzpm31U sk4jyqcQG+FdpAQ5MarPj7e7wit9Q7de2KixdnCX7KR7GDRCko+90P1Az6O9lQHsJgaaWHdN6b5cN FQ5cXchjg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWfo8-00072k-Vi; Mon, 18 Nov 2019 12:07:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWfnt-0006r5-GD; Mon, 18 Nov 2019 12:06:51 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F6D11FB; Mon, 18 Nov 2019 03:59:32 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0D2553F6C4; Mon, 18 Nov 2019 03:59:31 -0800 (PST) Date: Mon, 18 Nov 2019 11:59:30 +0000 From: Mark Brown To: Robin Murphy Subject: Re: [PATCH 2/2] PCI: rockchip: Simplify optional regulator handling Message-ID: <20191118115930.GC9761@sirena.org.uk> References: <1eebc002101931012d337cda23d18f85b0326361.1573908530.git.robin.murphy@arm.com> <347bc3ef8399577e4cef3fdbf3af34d20b4ad27e.1573908530.git.robin.murphy@arm.com> MIME-Version: 1.0 In-Reply-To: <347bc3ef8399577e4cef3fdbf3af34d20b4ad27e.1573908530.git.robin.murphy@arm.com> X-Cookie: no maintenance: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191118_040649_668680_366EEAE6 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, heiko@sntech.de, linux-pci@vger.kernel.org, shawn.lin@rock-chips.com, lgirdwood@gmail.com, linux-rockchip@lists.infradead.org, bhelgaas@google.com, andrew.murray@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============0451601358706266005==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0451601358706266005== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DSayHWYpDlRfCAAQ" Content-Disposition: inline --DSayHWYpDlRfCAAQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 16, 2019 at 12:54:20PM +0000, Robin Murphy wrote: > Null checks are both cheaper and more readable than having !IS_ERR() > splattered everywhere. > - if (IS_ERR(rockchip->vpcie3v3)) > + if (!rockchip->vpcie3v3) > return; > =20 > /* > @@ -611,6 +611,7 @@ static int rockchip_pcie_parse_host_dt(struct rockchi= p_pcie *rockchip) > if (PTR_ERR(rockchip->vpcie12v) !=3D -ENODEV) > return PTR_ERR(rockchip->vpcie12v); > dev_info(dev, "no vpcie12v regulator found\n"); > + rockchip->vpcie12v =3D NULL; According to the API NULL is a valid regulator. We don't currently actually do this but it's storing up surprises if you treat it as invalid. --DSayHWYpDlRfCAAQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl3Sh6EACgkQJNaLcl1U h9AOkgf/VTgP3xuhrmrWsbUIyqn+9NRUQlo2cBfiCB08Dqwn+Nyoeb6LLY0SnG6R ezJOmBDiE/Ih8trc+IRq/nAgaM620I3ZLeodmwtndxikXe2QEl59zkpmiY3JQDlG prOhuT1YC88FD5fPT1bmSxJyRpLwZ/dI4fP0SwuGn7sYXdv0285guwMhP80Kjn9p Z8Z5x2AG7D41r8QMatZ0q0/W2rma7jdcE4J7yllyxDOHA8BqMX8GQs3UGohFU1GR 9bs8wM7zhZYoWS7YCuRmytgh85YUV1i/iM0OqGhzni4/ir6jQ89uZA4/KEk5S/MO OkxQcqTDVXdu97bEOyC3ofVQiby50w== =OHJP -----END PGP SIGNATURE----- --DSayHWYpDlRfCAAQ-- --===============0451601358706266005== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0451601358706266005==--