Received: by 10.192.165.148 with SMTP id m20csp3439551imm; Mon, 23 Apr 2018 06:40:19 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nkf8nl8VdneSoJcl0mqhykmGumffPjLgIvxhyo/sHO/7IrWrJwdBQeuSXAvb6iEwwXTc5 X-Received: by 2002:a17:902:585e:: with SMTP id f30-v6mr20808452plj.50.1524490819016; Mon, 23 Apr 2018 06:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524490818; cv=none; d=google.com; s=arc-20160816; b=cNEuN704lzYk+dPH7c7Vq9SO1b3Yt3N4dOPbWqAFVOhEgURp3oR/iuXAa7zGVU/5gE CBQLiRNvuG+Q58shWNpMVS2y3ejT67tohdPCqL52OtLRvPW93W/71nhDx+bK9EDMvVVu HmV/rc8FHQcdBKFjLWPXA3IBDaBDkv7zpHsmxJKkrS3nv7d9oniigLs8IPqOGz36vS5p sHaxuqDDOA95eL4Gjc73TbUzhCtnypThJPiSSG07j9osOWrHdcHpxceVcghSz/KwXHw7 YkxbqpQHrijuisuCdz7ftQd7ZgqBH+WeNe6yGTRIgkgfGEoVr7Yz4SvWtMdJy98ylRW5 w2vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:date:cc:to:from:subject :message-id:arc-authentication-results; bh=GBB25bvdsPMIcSC4o2QOQMxK5bCKXJf+ey/ijf0iQls=; b=FT8pkyC/5PYyK7NQ10+KCXzmb8WruZtUr3wal9sysmiz1vdNerTk7WgPRVL3B2W0mu r+DGpRxK2hJpy4DtRoLaS0MaWpxitKs4sWPT8ykw5Hf9VOvgSBq0qaiQDLSwBhhbgSV+ TU+gMfEtoMZUJxyUUVZ4G03NnsP3lqsFGtYLs3H826pXAM2JtFIvNMU44E/yYnxn48KJ XkIqpXetP2QrjVnVGDNFlauhnlCbHQ2jhfYco2TwNETT4O6ORn/R8m5+kO7ShuLrd7yg I3BbrcUYG8fSzGbfz5TR47+xWdj1IACEBOAV2P6m7U47mEqKEUkFn8Djg8m5/pp8tzWV aPTw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d127si93159pgc.236.2018.04.23.06.40.03; Mon, 23 Apr 2018 06:40:18 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755268AbeDWNiy (ORCPT + 99 others); Mon, 23 Apr 2018 09:38:54 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:40962 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185AbeDWNiw (ORCPT ); Mon, 23 Apr 2018 09:38:52 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 8CD8927C1D3 Message-ID: <34cd09b249cc302d7f2867d0d663321021328cbf.camel@collabora.com> Subject: Re: [PATCH 5/6] devfreq: rk3399_dmc: do not print error when get supply and clk defer. From: Ezequiel Garcia To: Ulf Hansson , Enric Balletbo i Serra Cc: Myungjoo Ham , Kyungmin Park , Rob Herring , devicetree@vger.kernel.org, Heiko Stuebner , Linux PM , Derek Basehore , Linux Kernel Mailing List , Doug Anderson , groek@google.com, kernel@collabora.com, Lin Huang , Chanwoo Choi Date: Mon, 23 Apr 2018 10:37:28 -0300 In-Reply-To: References: <20180419104019.24406-1-enric.balletbo@collabora.com> <20180419104019.24406-6-enric.balletbo@collabora.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-04-23 at 12:44 +0200, Ulf Hansson wrote: > On 19 April 2018 at 12:40, Enric Balletbo i Serra > wrote: > > From: Lin Huang > > > > We just return -EPROBE_DEFER error code to caller and do not > > print error message when try to get center logic regulator > > and DMC clock defer. > > > > Signed-off-by: Lin Huang > > Signed-off-by: Enric Balletbo i Serra > > --- > > > > drivers/devfreq/rk3399_dmc.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/drivers/devfreq/rk3399_dmc.c b/drivers/devfreq/rk3399_dmc.c > > index 44a379657cd5..5bfca028eaaf 100644 > > --- a/drivers/devfreq/rk3399_dmc.c > > +++ b/drivers/devfreq/rk3399_dmc.c > > @@ -308,12 +308,18 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev) > > > > data->vdd_center = devm_regulator_get(dev, "center"); > > if (IS_ERR(data->vdd_center)) { > > + if (PTR_ERR(data->vdd_center) == -EPROBE_DEFER) > > + return -EPROBE_DEFER; > > + > > dev_err(dev, "Cannot get the regulator \"center\"\n"); > > Doesn't the clock core already print an error message for this? > s/clock/regulator? > Maybe a better way is simply to drop the printing instead of trying to > have a special case for it? > I don't think so. If you remove this print you: i) might get a print from the core, or ii) maybe not because of some path without a print. And even if you do get an error, it might not relate exactly to the driver that requested the resource, because you might be printing via pr_xxx, from a context without a struct dev to use dev_xxx. > > return PTR_ERR(data->vdd_center); > > } > > > > data->dmc_clk = devm_clk_get(dev, "dmc_clk"); > > if (IS_ERR(data->dmc_clk)) { > > + if (PTR_ERR(data->dmc_clk) == -EPROBE_DEFER) > > + return -EPROBE_DEFER; > > + > > dev_err(dev, "Cannot get the clk dmc_clk\n"); > > return PTR_ERR(data->dmc_clk); > > }; > > -- > > 2.17.0 > > > > Kind regards > Uffe >