[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68b73077-9fff-9b4c-bf6a-8aca24a814d7@free.fr>
Date: Mon, 20 May 2019 10:14:41 +0200
From: Marc Gonzalez <marc.w.gonzalez@...e.fr>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: MSM <linux-arm-msm@...r.kernel.org>,
linux-clk <linux-clk@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] clk: qcom: gdsc: WARN when failing to toggle
On 04/05/2019 02:17, Bjorn Andersson wrote:
> Failing to toggle a GDSC as the driver core is attaching the
> power-domain to a device will cause a silent probe deferral. Provide an
> explicit warning to the developer, in order to reduce the amount of time
> it take to debug this.
"it takes"
> Signed-off-by: Bjorn Andersson <bjorn.andersson@...aro.org>
> ---
> drivers/clk/qcom/gdsc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index dd63aa36b092..6a8a4996dde3 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -149,7 +149,9 @@ static int gdsc_toggle_logic(struct gdsc *sc, enum gdsc_status status)
> udelay(1);
> }
>
> - return gdsc_poll_status(sc, status);
> + ret = gdsc_poll_status(sc, status);
> + WARN(ret, "%s status stuck at 'o%s'", sc->pd.name, status ? "ff" : "n");
> + return ret;
In my opinion, the minor obfuscation of "o%s", foo ? "ff" : "n"
does not justify the tiny space savings.
I'd spell it out: "%s", foo ? "off" : "on"
In any event:
Reviewed-by: Marc Gonzalez <marc.w.gonzalez@...e.fr>
Regards.
Powered by blists - more mailing lists