Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4342170ybg; Mon, 21 Oct 2019 07:34:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwB2rbSKrV2AnVIhDja2Z6CZlzEbI23nN/Fxbd3X8CvLzW7LgaWjlrZEhuY3PYX54AeDQjM X-Received: by 2002:a17:906:e296:: with SMTP id gg22mr4509628ejb.211.1571668447270; Mon, 21 Oct 2019 07:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571668447; cv=none; d=google.com; s=arc-20160816; b=a2CidbaR6cxJ6bWUcfRVXZenZnMNIfGmrqaJAkNGjaLhBYA9ipuI39A3UOInQpObUe BJA/LvoZUkAQQ0VUrggFoF1xjz56w/BZB8Fbp+q7fMfu/8f8nci6W5wsFB6COmu+G25m Gm+fkoGsiwPsD1IPTWjVj1PQTpwn4PGKtHNckCRqrzFs7byi5PdZnAZ7wHQ7vAvxri6D quOMRrSCFXuY86eORN2dWsBoBkHpAxoCg+FnmaFdTcEV/IOFbVffsLsYfF1fHeNGpqEf 2GSC9UNx7jVVGI2AGLCQpBqiMyxfaNN0dlFXsLj1huFYeIiF36f3l1Hie7+ggeCdxVt/ KzQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=8jfA0P/Q8T8UjCLrgdWWyNBUpvtRRs/536E+E+xKTUI=; b=eEpcNwcTGIABcX4DpQMfDOoLolvhVBFZ9lI9cyKbaKk4YgEclaE2slISQcqwF7krw1 cG0vvvSLehCH+B3cF333z4KBCBDdSqXgxw6eK/hyN3UnnAeqIO3Y4AGXNFr6eCUugtoP 5RQjjx+NEjTyXpYUnmzr+tixQheqlJqawutq4VV8WdJ83JR+doz0rOXBmvlMIcGJPFJ+ z2JBCUrQ7ZgnucSIZ9J+29U7ELMC5NjbNPdO7wSJoms3I0WeW/VDVEObPUphf+O8utla BDZcDJNuQwZX/604Zrq3y/yZhNN4xZ3FrJuhJqFiuqSAjkwnIDRHnTeq0VFUbdr0SiJh wPVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fo+M5yNG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si8873867ejr.416.2019.10.21.07.33.39; Mon, 21 Oct 2019 07:34:07 -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; dkim=pass header.i=@linaro.org header.s=google header.b=fo+M5yNG; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727739AbfJUOd2 (ORCPT + 99 others); Mon, 21 Oct 2019 10:33:28 -0400 Received: from mail-vk1-f193.google.com ([209.85.221.193]:37730 "EHLO mail-vk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfJUOd2 (ORCPT ); Mon, 21 Oct 2019 10:33:28 -0400 Received: by mail-vk1-f193.google.com with SMTP id v78so2803462vke.4 for ; Mon, 21 Oct 2019 07:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8jfA0P/Q8T8UjCLrgdWWyNBUpvtRRs/536E+E+xKTUI=; b=fo+M5yNGWjh6WpyTan0dMaP6adElk8Q28uVOOSVGR6oiDnQuPMI6e5xfGmEds2bvv2 IZMqR+5WOgGiJjjultpETJ7uo8T7veXupA55susBuyXB3N3RA8t2kBkiFC7FeiwQrY0a S3uv76RJKvqdexspozSjBMMdh+Fbw7PUvOfTRlUkCf3WFVU48277x4gcmqd5D63DMsLp SvtWTKOaN/08hHadAKZNaTeN3YkefHsndbvdf3CYoc7cu4n3287YMpAgef4nIr6AXUWQ lQfJ9MA1fE89OMxCfSUQ29NsqZEh07ssu/CmNX5i+UalUOUU+JKl/VNLstP4teC6m+4q AVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8jfA0P/Q8T8UjCLrgdWWyNBUpvtRRs/536E+E+xKTUI=; b=Ezymb3o4qiOQS7mhd5DpJ8of9Y7EzPE4agTEw4xO7Hf0ahOmDcqbpMJMVkgPIIJZHM 15rJwjdq5u8ZVtc+HKJhLozcuKIizbo2cGnAZFegt+rmb82v6YTHC7U/7wbFEX33I3Fk 8t1fOpJ4gBz/g4DPapShPkxu1yhXXE2/vnXQQB0PaWNoEHcbgrfrH9PhgNIFGa4Z+YdC ZJURNmixGJrKCBVdtJ8qAUFFN3zW8QLr6i1iA2t52Mbkvc0stuJLQXMJA9X0KoY20Js+ 5aCbWdYD41dOvrT6v34eyN58pwVo+CUtp9+Cgk3r3NzCq832OPAdj2upd3VAenINZ9fq 8Nzw== X-Gm-Message-State: APjAAAUtafEKzql1ObSlAvvcYwbR0joJaiW06O9WJkrANklU//Xz8nkL C1BecrnPwIxe57rgHXxAaa1Yb/XOxthOq5ieDDT7kg== X-Received: by 2002:a1f:2f51:: with SMTP id v78mr12965554vkv.101.1571668405527; Mon, 21 Oct 2019 07:33:25 -0700 (PDT) MIME-Version: 1.0 References: <20191018131338.11713-1-hslester96@gmail.com> In-Reply-To: <20191018131338.11713-1-hslester96@gmail.com> From: Ulf Hansson Date: Mon, 21 Oct 2019 16:32:49 +0200 Message-ID: Subject: Re: [PATCH] mmc: renesas_sdhi: add checks for pinctrl_lookup_state To: Chuhong Yuan , Wolfram Sang Cc: "linux-mmc@vger.kernel.org" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/renesas_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 *pdev, > if (!IS_ERR(priv->pinctrl)) { > priv->pins_default = pinctrl_lookup_state(priv->pinctrl, > PINCTRL_STATE_DEFAULT); > + if (IS_ERR(priv->pins_default)) > + return PTR_ERR(priv->pins_default); > + > priv->pins_uhs = pinctrl_lookup_state(priv->pinctrl, > "state_uhs"); > + if (IS_ERR(priv->pins_uhs)) > + return PTR_ERR(priv->pins_uhs); > } 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!? 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? > > host = tmio_mmc_host_alloc(pdev, mmc_data); > -- > 2.20.1 > Kind regards Uffe