Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4668700yba; Mon, 20 May 2019 01:24:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqysPLKj8+8vGg3SqkKZ7s1ShtVo5Zgqg69ua8hx6PHA460Nn6qNNCnWGJnxCnoqWkRUHhG2 X-Received: by 2002:aa7:930e:: with SMTP id 14mr21813796pfj.262.1558340680328; Mon, 20 May 2019 01:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558340680; cv=none; d=google.com; s=arc-20160816; b=uf+qClyOx+cfW9BsQrfIdiqWXD991xbyXDTyq2npGDFKNdavXfiYezANRWCKYfN/UQ 8DDaZjBhZmgdmdV2huFvGhj+SORJJ8UGtKo3OcwJTNR4czSllUYNrepyySRoPIyNcehz J8hELoARQEm7uyqnq4Yna9kcrPQPSd744CoD24e6yvUK9FYSB/+3HfHDDcYwC/lK3TVi HaET38jYyWgTdGWv46uqcMX74i6E46Z8EHXh9qCrrZoG1Q/e2jzD3LKN2nb/s+/83WZL Gavbb5euDLyCcXyAvyRrOhKtAInjUGL9o7PsheQNLj6jgzl/vn2cbqwJ2qc0VSRxa8mz FpoA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=B/In+PtiBjlQRG4C+0iiatGyKOuzRIbSqjwm1A3H+tc=; b=EhPrs6X/m5505oF5gTbFHsw64fTMRY9UN1rXu2D83k+et82ReS8xdSZ9PGrcKPRpcq uUVJztyh75kjKjZ/psm6xk06JpYT8CnDTtdcfgBBjKI0o/KCZj+LxqwdqJgXNm0v0+EZ TdidokVhfud9jnNHx+sT5uNHncr3CYqsjBrF4e/JF9c/g9KUsbg/jDzr2VJVvAe+zjZ3 mAz/GLA2P1t2M7sgRqLHVvBG2hBHgLywmjVIGUDqls2f6BImWp7IPyumLnVclZeBMQmf JnGtzDEBrf4Z5C8KEdsJNJnkjM35IuGX7UxW7wdz7FNDDyL81ry3T158zx4xYu+EPWu+ vYsA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si17573646pgx.176.2019.05.20.01.24.25; Mon, 20 May 2019 01:24:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730978AbfETIOn (ORCPT + 99 others); Mon, 20 May 2019 04:14:43 -0400 Received: from ns.iliad.fr ([212.27.33.1]:60906 "EHLO ns.iliad.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730549AbfETIOn (ORCPT ); Mon, 20 May 2019 04:14:43 -0400 Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 4DCA520B5F; Mon, 20 May 2019 10:14:41 +0200 (CEST) Received: from [192.168.108.49] (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 3973020AC3; Mon, 20 May 2019 10:14:41 +0200 (CEST) Subject: Re: [PATCH] clk: qcom: gdsc: WARN when failing to toggle To: Bjorn Andersson , Michael Turquette , Stephen Boyd Cc: MSM , linux-clk , LKML References: <20190504001736.8598-1-bjorn.andersson@linaro.org> From: Marc Gonzalez Message-ID: <68b73077-9fff-9b4c-bf6a-8aca24a814d7@free.fr> Date: Mon, 20 May 2019 10:14:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190504001736.8598-1-bjorn.andersson@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Mon May 20 10:14:41 2019 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 Regards.