LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>
Cc: Myungjoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, Heiko Stuebner <heiko@sntech.de>,
	Linux PM <linux-pm@vger.kernel.org>,
	Derek Basehore <dbasehore@chromium.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Doug Anderson <dianders@google.com>,
	groek@google.com, kernel@collabora.com,
	Lin Huang <hl@rock-chips.com>,
	Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [PATCH 5/6] devfreq: rk3399_dmc: do not print error when get supply and clk defer.
Date: Mon, 23 Apr 2018 10:37:28 -0300	[thread overview]
Message-ID: <34cd09b249cc302d7f2867d0d663321021328cbf.camel@collabora.com> (raw)
In-Reply-To: <CAPDyKFpQUFSoUC=FjAjfk5An0yCKWEcwjrBxqXYv8GakvWe4mA@mail.gmail.com>

On Mon, 2018-04-23 at 12:44 +0200, Ulf Hansson wrote:
> On 19 April 2018 at 12:40, Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
> > From: Lin Huang <hl@rock-chips.com>
> > 
> > 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 <hl@rock-chips.com>
> > Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> > ---
> > 
> >  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
> 

  reply	other threads:[~2018-04-23 13:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 10:40 [PATCH 0/6] devfreq: rk3399_dmc: improve rk3399_dmc driver and it's documentation Enric Balletbo i Serra
2018-04-19 10:40 ` [PATCH 1/6] dt-bindings: devfreq: rk3399_dmc: improve binding documentation Enric Balletbo i Serra
2018-04-19 10:40 ` [PATCH 2/6] dt-bindings: clock: add DDR3 standard speed bins Enric Balletbo i Serra
2018-04-19 11:10   ` Heiko Stuebner
2018-04-19 11:30     ` Enric Balletbo i Serra
2018-04-20 10:58       ` Heiko Stuebner
2018-04-19 10:40 ` [PATCH 3/6] devfreq: rk3399_dmc: remove wait for dcf irq event Enric Balletbo i Serra
2018-04-24  3:55   ` Chanwoo Choi
2018-04-19 10:40 ` [PATCH 4/6] dt-bindings: devfreq: rk3399_dmc: remove interrupts as is not required Enric Balletbo i Serra
2018-04-24  3:56   ` Chanwoo Choi
2018-04-19 10:40 ` [PATCH 5/6] devfreq: rk3399_dmc: do not print error when get supply and clk defer Enric Balletbo i Serra
2018-04-23 10:44   ` Ulf Hansson
2018-04-23 13:37     ` Ezequiel Garcia [this message]
2018-04-24  3:55   ` Chanwoo Choi
2018-04-19 10:40 ` [PATCH 6/6] devfreq: rk3399_dmc: register devfreq notification to dmc driver Enric Balletbo i Serra
2018-04-24  4:08   ` Chanwoo Choi
2018-04-23 10:53 ` [PATCH 0/6] devfreq: rk3399_dmc: improve rk3399_dmc driver and it's documentation Ulf Hansson
     [not found] ` <CGME20180419104054epcas5p49612174afb26493bcd937a0232b9b1df@epcms1p3>
2018-04-24  1:53   ` [PATCH 1/6] dt-bindings: devfreq: rk3399_dmc: improve binding documentation MyungJoo Ham
     [not found] ` <CGME20180419104056epcas2p29c74949b650fea596900e395dec662e8@epcms1p7>
2018-04-24  2:31   ` [PATCH 3/6] devfreq: rk3399_dmc: remove wait for dcf irq event MyungJoo Ham
     [not found] ` <CGME20180419104057epcas5p311ecfdeb6cb535cd7100232d282ac323@epcms1p4>
2018-04-24  2:33   ` [PATCH 5/6] devfreq: rk3399_dmc: do not print error when get supply and clk defer MyungJoo Ham
     [not found] ` <CGME20180419104059epcas2p3fe5aba95859e02307556200a42bc1ac2@epcms1p7>
2018-04-24  4:22   ` [PATCH 6/6] devfreq: rk3399_dmc: register devfreq notification to dmc driver MyungJoo Ham
2018-04-24  8:01     ` Enric Balletbo i Serra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34cd09b249cc302d7f2867d0d663321021328cbf.camel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=cw00.choi@samsung.com \
    --cc=dbasehore@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@google.com \
    --cc=enric.balletbo@collabora.com \
    --cc=groek@google.com \
    --cc=heiko@sntech.de \
    --cc=hl@rock-chips.com \
    --cc=kernel@collabora.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=robh+dt@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --subject='Re: [PATCH 5/6] devfreq: rk3399_dmc: do not print error when get supply and clk defer.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).