Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp709266imm; Thu, 26 Jul 2018 10:35:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe85g+GcKbKLePx577fsBTVixn7+Ql7b6cFVkVFPM3v6MZChHSopWy4CQ2Ll+eM94V6dkCg X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr2844427pll.165.1532626516033; Thu, 26 Jul 2018 10:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532626516; cv=none; d=google.com; s=arc-20160816; b=yYtPITn7OGlmcqxlMSOg1ZPOThxvjBdyvFFnMXTwIRcbOON4OTiO85K88dZzsLQa3r +4EqYQilwl2fwCEWGs2pt9g2uYX2aSVC4rJzgP8XHxzMb7w6kgunov9VwXrY1ePqjZVI XjHZ37tCGEZSBydv+QEHC0/ra3GTuY5xJ/3bT93Sscb8sAbEYO9mcN6Um6LAB1jBociB UqeAwDvafQ4g2jc9s380Nh0+cGnDISKGTRkztHoaREMaH04ZRi48RtY8nvTI93yp7ePz 3aVuy9JI0aDywA5eL7ZbKEmBfpCryq+CGSnZVLkB61KdKxjijqj5lov/cvDCBEITapCN JcjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=gMg91nHfEvhqtr+F6RHXwNAODnmn0GLr2nmAtPdAPWs=; b=jbINZI53HMUsE+oWFQ9FPJ4JohXH6ZuFyvycOVSs0ouQxnrX4iuFSNJ2+Sh3EDIAND dyYW1dpGYfnHk6J/6+r7v6gICLdzmNXRu8ah0t1dXn0q0DSGsDf2PP0FJ1ucbTDzCGX2 nxqlsXTlTX3a9Rd+91CgGfodql2skn034r1XVWy24Z18aqWo7ZyeGL+fqv5GL6tdDdko 4iDEVKAVuC486SEoxUR0kq3dyq+S/ajF/mQmH+t6TcqAxwwjJJHFYQwZySeVhWKhvLEv jiUIFHhyssKn/F0J6zySFUbJZSMtfK6rn890d4mBp8q5RYAm6DaalQD97ByhJY7WiUfx lTOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QgFZa5O3; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si1613241pld.515.2018.07.26.10.35.00; Thu, 26 Jul 2018 10:35: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; dkim=pass header.i=@kernel.org header.s=default header.b=QgFZa5O3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388446AbeGZR7q (ORCPT + 99 others); Thu, 26 Jul 2018 13:59:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:60502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730413AbeGZR7q (ORCPT ); Thu, 26 Jul 2018 13:59:46 -0400 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 091C12089B; Thu, 26 Jul 2018 16:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532623328; bh=ouhfAjhk7O9jBWBqw1VQqKROTae6WtGAjnjuYqGVLWU=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=QgFZa5O37xrf4hy/Xa+gi5669ba7eG3IS5ySjV42U162eguknzJihHqgV0MsTRp0I uybMO1x6WuV7WuhlOTAEsZDDnjm/guY9/EJbwoLyzxKHPRaWHIjTtAdodYbIk1HLdE lAc7AiJ4WhOzFj8RG1AVQ568djKDPh3pbPGuL3bg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Stefan Agner From: Stephen Boyd In-Reply-To: <13595e6b8bfb364023648297cad7da1b@agner.ch> 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 References: <20180720075422.26563-1-marcel@ziswiler.com> <153256109511.48062.12389268791907553857@swboyd.mtv.corp.google.com> <153259028259.48062.10565668407094066922@swboyd.mtv.corp.google.com> <13595e6b8bfb364023648297cad7da1b@agner.ch> Message-ID: <153262332731.48062.8709620189648679243@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH] clk: tegra: probe deferral error reporting Date: Thu, 26 Jul 2018 09:42:07 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Stefan Agner (2018-07-26 00:55:16) > 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-d= fll.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_devic= e *pdev, > >> >> > >> >> td->vdd_reg =3D 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 =3D 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() All of it isn't really there when you consider devices may have many different resources they're trying to get and then tracking down the one driver that isn't probed and providing the resource fails. Then you get to resort to hacking prints into the driver to see what particular resource is probe defering. > = > So I suggest to just silence the EPROBE_DEFER case, e.g.\ > = > = > if (IS_ERR(td->vdd_reg)) { > ret =3D PTR_ERR(td->vdd_reg); > if (ret !=3D -EPROBE_DEFER) > dev_err(td->dev, "couldn't get vdd_cpu regulator:= %d\n", ret); > = > return ret; > } > = Sure this is fine.