From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6808AC433DF for ; Wed, 14 Oct 2020 23:00:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 199C420797 for ; Wed, 14 Oct 2020 23:00:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602716451; bh=Iuq4p7SE+3zmq4h6neqIJS6zra1rULNlT+guIBTPmX8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:List-ID:From; b=PldkX8bu74RIBYXyrlfhGJDHzkySgt/28yhVcbcfre7nSAwWeGjboM3KEbEIBHzid JZYlrn7Q9wTH+MFIR6UiGw9QOGaxz/Ps8sL9EUqSc7bbjByZQyfafGA9A6Ba70Fr0A Fk8pCXhbBciNkVd5N2w7Pgsw8GKIsOpWff/o4RNI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730399AbgJNXAu (ORCPT ); Wed, 14 Oct 2020 19:00:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:45934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgJNXAu (ORCPT ); Wed, 14 Oct 2020 19:00:50 -0400 Received: from kernel.org (unknown [104.132.1.79]) (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 E4E4020776; Wed, 14 Oct 2020 23:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602716449; bh=Iuq4p7SE+3zmq4h6neqIJS6zra1rULNlT+guIBTPmX8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=ZE5CtvlSe5cF/HVaQ/RCnB6oUOGyfYTS1xCgopUkKaXeetIDNmN1NOU7k6SsccZdn epiNkpf53/k4E5AHBZ4taVyE5DEJi+Pu9rWNi9ryw/fLpVRAIKBaCfKTvPHT6LnRe9 vMD+Ge1JWU7k/AagoBW7oriERIMEDyym8j+h3b+A= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20201014140507.v3.1.I4567b5e7e17bbb15ef063d447cb83fd43746cb18@changeid> <20201014140507.v3.2.I75c409497d4dea9daefa53ec5f93824081c4ecbe@changeid> <160271345117.884498.6375969749730135625@swboyd.mtv.corp.google.com> Subject: Re: [PATCH v3 2/3] clk: qcom: lpass-sc7180: Disentangle the two clock devices From: Stephen Boyd Cc: Taniya Das , open list: ARM/QUALCOMM SUPPORT , David Brown , Rajendra Nayak , Andy Gross , Bjorn Andersson , Michael Turquette , linux-arm-msm , linux-clk , LKML , ; Illegal-Object: Syntax error in Cc: address found on vger.kernel.org: Cc: ; ^-missing semicolon to end mail group, extraneous tokens in mailbox, missing end of mailbox To: Doug Anderson Date: Wed, 14 Oct 2020 16:00:47 -0700 Message-ID: <160271644762.884498.446447786516269652@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Quoting Doug Anderson (2020-10-14 15:28:58) > Hi, >=20 > On Wed, Oct 14, 2020 at 3:10 PM Stephen Boyd wrote: > > > > Quoting Douglas Anderson (2020-10-14 14:05:22) > > > diff --git a/drivers/clk/qcom/lpasscorecc-sc7180.c b/drivers/clk/qcom= /lpasscorecc-sc7180.c > > > index abcf36006926..48d370e2108e 100644 > > > --- a/drivers/clk/qcom/lpasscorecc-sc7180.c > > > +++ b/drivers/clk/qcom/lpasscorecc-sc7180.c > > > @@ -356,12 +356,48 @@ static const struct qcom_cc_desc lpass_audio_hm= _sc7180_desc =3D { > > > .num_gdscs =3D ARRAY_SIZE(lpass_audio_hm_sc7180_gdscs), > > > }; > > > > > > +static void lpass_pm_runtime_disable(void *data) > > > +{ > > > + pm_runtime_disable(data); > > > +} > > > + > > > +static void lapss_pm_clk_destroy(void *data) > > > +{ > > > + pm_clk_destroy(data); > > > +} > > > > Why are these helpers added again? And do we even need them? Can't we > > just pass pm_runtime_disable or pm_clk_destroy to the > > devm_add_action_or_reset() second parameter? >=20 > Unfortunately, we can't due to the C specification. Take a look at > all the other users of devm_add_action_or_reset() and they all have > pretty much the same stupid thing.=20 Ok, but we don't need two of the same functions, right? > ...actually, do we even need the runtime_disable in the error path? > When the dev goes away does it matter if you left pm_runtime enabled > on it? >=20 I don't know. The device isn't destroyed but maybe when the driver is unbound it resets the runtime PM counters?