Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1667214ybg; Wed, 23 Oct 2019 20:51:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaf5u4iP2HrYxwxIRQPo/U5YtL2/148FrykvVmciSCUSra8XKz+s7923OKf/01Sc09VeV7 X-Received: by 2002:a17:906:a98f:: with SMTP id jr15mr244631ejb.298.1571889075402; Wed, 23 Oct 2019 20:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571889075; cv=none; d=google.com; s=arc-20160816; b=IwLAFC4gzhousK5Nu7zpP5KkHyMhi7Tpo4vJKFy4U6N4bxjysQzYCvCa1UVzFrcN2y 0FWqIuchx5fofWZ61swIA85s6DVJQp2xNY9P3iBbTNmkklwCfMmKjtFQ/URy7ZmMkOpE Z8bcGTW5wrshSYfvlZTGCTFWkvJnT/A5A8vmitibJuWYfY4iQZHzV8utEB8IQemG+Gwl 5REFtuzyv+HfhDxY4AyB3PwkVpZ31+ytFJrz8K/706QSLCkdtfbDI3HKbVkc4i7CDK04 abljxZcb0/cnI7cogqKOZ3qd3l6RbUx5U8DmOy/pXQVjIpbFomTqWLNoU1gTUlMr46/I zjYw== 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; bh=YizwYvySZNbMnOcBAIFnX9HFLAVFa+NhI3qhlRj6PN8=; b=oq4yexRsFRKACHbo2u2jztEgbAWXkOPkYQm5jTx90J+2m9XRNZrb3cx6dTRS1eiGcd tctN1U4LxNIyXPb6hRlCWL1WenmZ8yNZsnzBjGvF1Dz4g26+qS1qlmj4vjS+RBdt9HtT VAim0l+YPQl8a/hB7V03NLF+eA2SpL56sCbDqepa6bHw9+Q/ztloaJB1Ri5gg8JScuQV 1GJ1lwTFU7VTqiAqhOwElOlkNnDmVEVP1lXZMtj2EuDvBRV4ED00sq1YFRZPwJCN8B80 9sngFVkYPDSu0lEeyENGTo8fyoo1eTKPwU7Y86LBze4SQO5I19EsvyEwM7MsFSwxf4aM KVng== 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 8si15261098ejc.104.2019.10.23.20.50.51; Wed, 23 Oct 2019 20:51:15 -0700 (PDT) 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 S2406748AbfJWPdQ (ORCPT + 99 others); Wed, 23 Oct 2019 11:33:16 -0400 Received: from sauhun.de ([88.99.104.3]:45324 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403853AbfJWPdQ (ORCPT ); Wed, 23 Oct 2019 11:33:16 -0400 Received: from localhost (p54B33207.dip0.t-ipconnect.de [84.179.50.7]) by pokefinder.org (Postfix) with ESMTPSA id 367582C001C; Wed, 23 Oct 2019 17:33:14 +0200 (CEST) Date: Wed, 23 Oct 2019 17:33:13 +0200 From: Wolfram Sang To: Ulf Hansson Cc: Chuhong Yuan , Wolfram Sang , "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state Message-ID: <20191023153313.GB5153@kunai> References: <20191018131338.11713-1-hslester96@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gatW/ieO32f1wygP" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gatW/ieO32f1wygP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 21, 2019 at 04:32:49PM +0200, Ulf Hansson wrote: > On Fri, 18 Oct 2019 at 15:13, Chuhong Yuan wrote: > > > > renesas_sdhi_probe misses checks for pinctrl_lookup_state and may miss > > failures. > > Add checks for them to fix the problem. > > > > Signed-off-by: Chuhong Yuan > > --- > > drivers/mmc/host/renesas_sdhi_core.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/re= nesas_sdhi_core.c > > index d4ada5cca2d1..dc5ad6632df3 100644 > > --- a/drivers/mmc/host/renesas_sdhi_core.c > > +++ b/drivers/mmc/host/renesas_sdhi_core.c > > @@ -694,8 +694,13 @@ int renesas_sdhi_probe(struct platform_device *pde= v, > > if (!IS_ERR(priv->pinctrl)) { > > priv->pins_default =3D pinctrl_lookup_state(priv->pinct= rl, > > PINCTRL_STATE_DEFAULT); > > + if (IS_ERR(priv->pins_default)) > > + return PTR_ERR(priv->pins_default); > > + > > priv->pins_uhs =3D pinctrl_lookup_state(priv->pinctrl, > > "state_uhs"); > > + if (IS_ERR(priv->pins_uhs)) > > + return PTR_ERR(priv->pins_uhs); > > } >=20 > This looks correct to me, as I guess if there is a pinctrl specified > for device node of the controller, it means that it should be used!? >=20 > I understand that this is only used for those variants that supports > UHS-I via the renesas_sdhi_start_signal_voltage_switch(). Wolfram, is > this fine you think? Well, I don't like to bail out because this error is not fatal for basic operations. How about releasing priv->pinctrl again with an additional warning that pinctrl settings are broken and will prevent 1.8v modes? Opinions? --gatW/ieO32f1wygP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl2wcrkACgkQFA3kzBSg KbYLrA//c8zF4HqJkaFNFIInZh0QWFD/4DVtK/SARs7eE/Ccf0DEE3hKk8WxvZAQ r21YVOhBw/dPlgog4xF0zBZZ2B4KIptDyJRZPVj/ZVoFBFrA1w+hu4HlUtiJMr79 apZNpwlhSkxTYfO6PEo4wuFuGmoLRA6qj+PJDeFb9uAWdxMUTU26KVwa6jZBAbE6 Hzfzvs4OXZGoawXSxfzY9IkwtHKR8CWaB8FpcdUSN88wwWVMopejAVMr2zUrOeec 6E6/mjT29Qut+rBl0SUcZZyy/9ZKsAsrslFOU8YLAMknHAonz0NYO+6XKu26qRhH wHgv6/6htzpeFJh8f8wbQ4aRdeRuCJFFvcAd1bqeTrWJ5sFq1MYFMRJs38bFgs1J AbWD5BBSC2nIGhHGXt9dHv7hxl4SDE+JCZu+VNjbdJOYqbGlNBMGyMXfZ2ZjPNS1 Z8cwz4l6KModx+s4sqM0BkSbn/uLzlCtmVHN7s/lLs0FMXOG4NQkKZwgowu6cKJX /PzXcT4N3Roswar2c5sncYHMPvTYNkknmp2T9qXQ3XELHZsb9f5xgONyzxNjwap1 K2H1ZCuoTrJMpi7NNQwmG5NovFEcAOQ7qlRlCE2ITBniH4XFeduveigSntXnioEE K5RKUqi+9gOjU9+BbXxLSzo8OCrF+6o+psCNCUWdVQHbnTgtKsw= =S45A -----END PGP SIGNATURE----- --gatW/ieO32f1wygP--