Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp159091imm; Thu, 26 Jul 2018 00:56:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfXFFHWh2YKnpsHC7Oqw4GagUOh0y067eWWmUjsxrD79tSAovt5GH05BibdlhxTeChusqTv X-Received: by 2002:a62:f50b:: with SMTP id n11-v6mr1041683pfh.120.1532591782961; Thu, 26 Jul 2018 00:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532591782; cv=none; d=google.com; s=arc-20160816; b=SafBOTJx9AfjaIKvAlPCekEzxsWSQ7Jx1pG4aWTJ+Dg9MqsATWQ983rB73wScEfIkA t/Y/tSDRH3fg7VPfNkoIXvpOmb58cFXNXZ5ArIGCF1QmHcWXYEIwjWDFQR45hjbq/xbr 0ttI7XvTUSJlnGYGXeOjxxRUgjjNuiC1K3+iuoWfhIKSku/2h3Fa9w8uGTo6JTWb0liQ rgyO4/UBM6dMgacIrUfjWHKmwEi/I6WfvAJOPX/AY2Vrd3a0DSDtQA+cpTdYFx+wnt2H 5wcTT6Ugr420eIuN0x5BzeB1PwJKmDbOPkzMxABLMPwq2xXe9cG1ZktUW3sruGlky/2Q t5iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=X0YXUnHZOhT8QBodmQ8THjsw/D1H/MDjXL2W1tCmpEM=; b=JmjS3FHiYRMV9CxNHo9S6/YvQZh9Pa4Teby/xVOFNyUPVG0OcJDkGHRRm0pGYEV6xz b1n3z+RvfOqqciglqVWHBV8kzrAGinvFpgjB1ht7O4BsQ2UGEzb9ljPFvXPgVotrh89C 7kwqY9hf0HVNsbrbAVGi+QMF/IEKdFNwjssFZUPX1ufZyAFmPER6qw9nY/XZ3Rv25Q7B OGbMQVs0RJ9N7lPbCojvu/pAboJxFOsLa9JzXrAMFWkKYYhLZ3zOEnbEs9TfClmFsP94 4PI5rtLO3nOJ025to2mjP7UqwYQLW0M0TTHA1ByCSGUOQQTaYYvb5lcNl2q/yuvuLWz7 XqLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=FOH3e5Ir; 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 k3-v6si649600pld.39.2018.07.26.00.56.07; Thu, 26 Jul 2018 00:56:22 -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=@agner.ch header.s=dkim header.b=FOH3e5Ir; 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 S1728806AbeGZJK4 (ORCPT + 99 others); Thu, 26 Jul 2018 05:10:56 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:53810 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbeGZJK4 (ORCPT ); Thu, 26 Jul 2018 05:10:56 -0400 Received: from webmail.kmu-office.ch (unknown [IPv6:2a02:418:6a02::a3]) by mail.kmu-office.ch (Postfix) with ESMTPSA id B45415C06D3; Thu, 26 Jul 2018 09:55:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1532591716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X0YXUnHZOhT8QBodmQ8THjsw/D1H/MDjXL2W1tCmpEM=; b=FOH3e5Ir60kkZSjW2pV8fAeLcp+kip/RHfcv/F6N5WY3/xJAR1YAA7LcpkAtQMoTgKjDBq ioR7N+zqXWxPNqs+luwQ5TnWF4T57jFfLWr0pyfZ0yQErO/kiWa0KhYA5bMyAIwNqvWTjH g7/AL+BKajH5SaC3y2h89CK4emFsqVQ= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Date: Thu, 26 Jul 2018 09:55:16 +0200 From: Stefan Agner To: Stephen Boyd Cc: Marcel Ziswiler , Peter Geis , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Marcel Ziswiler , Thierry Reding , Prashant Gaikwad , Peter De Schrijver , Jonathan Hunter , Michael Turquette , linux-clk@vger.kernel.org, linux-tegra-owner@vger.kernel.org Subject: Re: [PATCH] clk: tegra: probe deferral error reporting In-Reply-To: <153259028259.48062.10565668407094066922@swboyd.mtv.corp.google.com> References: <20180720075422.26563-1-marcel@ziswiler.com> <153256109511.48062.12389268791907553857@swboyd.mtv.corp.google.com> <153259028259.48062.10565668407094066922@swboyd.mtv.corp.google.com> Message-ID: <13595e6b8bfb364023648297cad7da1b@agner.ch> X-Sender: stefan@agner.ch User-Agent: Roundcube Webmail/1.3.4 X-Spamd-Result: default: False [-0.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWELVE(0.00)[13]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.07.2018 09:31, Stephen Boyd wrote: > Quoting Peter Geis (2018-07-25 16:42:34) >> On 7/25/2018 7:24 PM, Stephen Boyd wrote: >> > Quoting Marcel Ziswiler (2018-07-20 00:54:22) >> >> From: Marcel Ziswiler >> >> >> >> Actually report the error code from devm_regulator_get() which may as >> >> well just be a probe deferral. >> >> >> >> Signed-off-by: Marcel Ziswiler >> >> >> >> --- >> >> >> >> drivers/clk/tegra/clk-dfll.c | 5 +++-- >> >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c >> >> index 48ee43734e05..b2123084e175 100644 >> >> --- a/drivers/clk/tegra/clk-dfll.c >> >> +++ b/drivers/clk/tegra/clk-dfll.c >> >> @@ -1609,8 +1609,9 @@ int tegra_dfll_register(struct platform_device *pdev, >> >> >> >> td->vdd_reg = devm_regulator_get(td->dev, "vdd-cpu"); >> >> if (IS_ERR(td->vdd_reg)) { >> >> - dev_err(td->dev, "couldn't get vdd_cpu regulator\n"); >> >> - return PTR_ERR(td->vdd_reg); >> >> + ret = PTR_ERR(td->vdd_reg); >> >> + dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret); >> > >> > Do you want to know that a probe defer is happening? Usually patches are >> > sent to make that error path silent. >> > >> >> Just asking as the newbie here, but shouldn't probe deferral be >> regulated to dev_debug? >> Then pass any other error code as dev_err. > > Yes probe defer should be relegated to debug level prints. Or really, we > should introduce a more complicated system to make debugging probe defer > errors simpler by informing us which driver is probe defering on what > resource by putting debug prints in each framework that returns probe > defer errors instead of updating each driver that uses these frameworks > and thinks it needs to print errors in these cases. And hide all that > behind some kernel commandline parameter and/or Kconfig option that lets > us turn the prints off all the time if we're not developing drivers or > testing things. Afaict, that is already there in: drivers/base/dd.c:really_probe() So I suggest to just silence the EPROBE_DEFER case, e.g.\ if (IS_ERR(td->vdd_reg)) { ret = PTR_ERR(td->vdd_reg); if (ret != -EPROBE_DEFER) dev_err(td->dev, "couldn't get vdd_cpu regulator: %d\n", ret); return ret; } -- Stefan > > -- > To unsubscribe from this list: send the line "unsubscribe linux-tegra" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html