Message ID | 20230713141738.23970-12-ulf.hansson@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1871381vqm; Thu, 13 Jul 2023 07:40:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlEDqRCmMPTioZt8U7CSlHyAweiTpfl2U2NmhaJIk2aCk2RRC14OB/JJ+qTENPMfcHhWqd9v X-Received: by 2002:a05:6a00:194a:b0:676:ad06:29d7 with SMTP id s10-20020a056a00194a00b00676ad0629d7mr2332940pfk.15.1689259237618; Thu, 13 Jul 2023 07:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689259237; cv=none; d=google.com; s=arc-20160816; b=d+qEkctbX7mz9Vp5jz5BrOgwUDUWYJlk6CUq2Q0tqXYQ+kYREiqXI1DXzcpZ3Lg+xQ 6uDlMAXtchef/P6d8AvGiDK8nNdxSmogzVrP48qEDOBWRBFhIFDEkX2tTjCnCVrUC7lA OqHaOz0FwDSd/SQW5EMJl2JSYCmL1Gmrw0flSXWJ+QuUrYgSy4ZImtD9ZFpM2wxeTbLh AclisusNitVQBahvLrtnc0l6TEKrIuyCpTz/bmO8kiV/3mjfhw0cd1EVsernoe36Q5Oc kPmJVcohPj7kxiaXwg8Wtxd92PZV0O17dbpKs+azJXr4Y8xIB9tq4EoaRSps7rGVoryB MEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b2FGnkTFhckKy1B44O7jpGYAwsWcXuAkok3ADC0wZTc=; fh=Q2nb2BHvaTFaA+2XRLtqHvemTVNJUuY7C/GNVgf41yw=; b=SGNXZnk5B/+Q5Re4zxszFTGHNI0DerXftVA6mbJt5JHeQD80K7fJEW4bP8i0NjI+5T VjMqjmMYb9z+CoBQH07JYQuqZ+kfDXygsR3AcHVCJnqxQwUtic6dklddLMoctKn0YXZE ghuYRDlonWLImGThn9G67sa65YbAVAAwCkQ7ixZHDNXGrbyh8i+PlbXIOF9do/NenphS eA1aVWkK4MEXEEJholJXZtoj1Rj9P2O7irJyFqka49nbDvdHMM8Yip3jPf5RHLCxnYXZ otzOvVcIS0kr70otY/yiUY0lk12Hfaik/a1iV0k+p20Ybm8CGS9I2fTxufUIdmytgEug U02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X9wOIS7s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fa23-20020a056a002d1700b00682642ec7c0si5401175pfb.338.2023.07.13.07.40.25; Thu, 13 Jul 2023 07:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X9wOIS7s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbjGMOTZ (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 13 Jul 2023 10:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbjGMOS2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Jul 2023 10:18:28 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A920D26AF for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 07:18:26 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4fb77f21c63so1390261e87.2 for <linux-kernel@vger.kernel.org>; Thu, 13 Jul 2023 07:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689257905; x=1691849905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b2FGnkTFhckKy1B44O7jpGYAwsWcXuAkok3ADC0wZTc=; b=X9wOIS7sK7yvNtsVAiKkpFNNk91CbLAr4zI+HQyk3zRR1NPaiQCXoby+zXUMadvHK8 eX/kBeKhdi62T144tgbpLA+i4vU3JD1rER4gDSvMYAVjXOKlb6KcZ2ALQrBG1rdr3xHK k4l1Mjx8G1F/4Zimf5K0/Y/NND9tQtLfwV4oyU0JZygLjFASGWARJG2l+NLmRjNOF5cF iv4ZkELNEcHy3DO6s2+vG64KL7p7IznRyOL+8maZqCa2LRwZZ47Zb9h7dxjnwt+CG0UM 2rijsnRKyxFR9dml1ng5KX58W/MYvqPWXLjtfz2HUFuB/EU5xNVY0Ce7OvcGlyz54Hpc mAmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689257905; x=1691849905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b2FGnkTFhckKy1B44O7jpGYAwsWcXuAkok3ADC0wZTc=; b=TNRWWk4Ti8AOW0oQ/uagkZmiy1DcDQCuELgzqV5TDykZRbXDgsS8wVWJFI54qP0wK3 2rkIqOF0vpcVclCuZZqA17oumijkzw8lMvzp3Guis9IqeXb80ymj79LjOAxIczFEZhAq v4TuuFfatZ9/a9RvISAXboURY8W1k3ZB3M3dfv9HiqPUoOpF9PNcP1aLc0tzLt4CHQrM 7wwZ6szLOFwKa9eXp1xXFtEelS4Wxptf/izMYB4d/fl7l7OSdkn0jboTLeIN5v/BQzxt WKkR8tXlexCBPSA1GsFYX/skWAOxeAJfDRy+6e/Z0EPvpk+MA4DOPBKOc9HOgE+ez+Ap QuVA== X-Gm-Message-State: ABy/qLavGXmc7onznSAyHygrAg6zqAymgci5KM4D4P3svsjNsyR2HZgZ 97EPm/jLpSRwJzZDNH69lt9YbA== X-Received: by 2002:ac2:43c4:0:b0:4f8:5f32:b1da with SMTP id u4-20020ac243c4000000b004f85f32b1damr1233186lfl.24.1689257905043; Thu, 13 Jul 2023 07:18:25 -0700 (PDT) Received: from uffe-tuxpro14.. (h-94-254-63-18.NA.cust.bahnhof.se. [94.254.63.18]) by smtp.gmail.com with ESMTPSA id w28-20020ac2599c000000b004fb759964a9sm1132426lfn.168.2023.07.13.07.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 07:18:24 -0700 (PDT) From: Ulf Hansson <ulf.hansson@linaro.org> To: Sudeep Holla <sudeep.holla@arm.com>, Cristian Marussi <cristian.marussi@arm.com>, Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org> Cc: Nikunj Kela <nkela@quicinc.com>, Prasad Sodagudi <psodagud@quicinc.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Ulf Hansson <ulf.hansson@linaro.org>, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 11/11] cpufreq: scmi: Drop redundant ifdef in scmi_cpufreq_probe() Date: Thu, 13 Jul 2023 16:17:38 +0200 Message-Id: <20230713141738.23970-12-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230713141738.23970-1-ulf.hansson@linaro.org> References: <20230713141738.23970-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771316694270111368 X-GMAIL-MSGID: 1771316694270111368 |
Series |
arm_scmi/cpufreq: Add generic performance scaling support
|
|
Commit Message
Ulf Hansson
July 13, 2023, 2:17 p.m. UTC
We have stubs for devm_of_clk_add_hw_provider(), so there should be no need
to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean
up the code a bit.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
Changes in v2:
- New patch.
---
drivers/cpufreq/scmi-cpufreq.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Thu, Jul 13, 2023 at 04:17:38PM +0200, Ulf Hansson wrote: > We have stubs for devm_of_clk_add_hw_provider(), so there should be no need > to protect this with the '#ifdef CONFIG_COMMON_CLK'. Let's drop it to clean > up the code a bit. > > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> > --- > > Changes in v2: > - New patch. > > --- > > drivers/cpufreq/scmi-cpufreq.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index b42f43d9bd89..ab967e520355 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -326,11 +326,9 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev) > if (IS_ERR(perf_ops)) > return PTR_ERR(perf_ops); > > -#ifdef CONFIG_COMMON_CLK I am not sure if it is no longer possible but at the time of addition of this it was possible to build with CONFIG_COMMON_CLK=n and any error was reported[1] I didn't want to add Kconfig dependency as this driver doesn't use any other clock apis and this was added to meet some OPP(?) requirement IIRC. We can drop the call to devm_of_clk_add_hw_provider if that is not the case. I need to check it again as I can't recall all the details right now. -- Regards, Sudeep [1] https://www.uwsg.indiana.edu/hypermail/linux/kernel/2012.0/04953.html
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index b42f43d9bd89..ab967e520355 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -326,11 +326,9 @@ static int scmi_cpufreq_probe(struct scmi_device *sdev) if (IS_ERR(perf_ops)) return PTR_ERR(perf_ops); -#ifdef CONFIG_COMMON_CLK /* dummy clock provider as needed by OPP if clocks property is used */ if (of_property_present(dev->of_node, "#clock-cells")) devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, NULL); -#endif ret = cpufreq_register_driver(&scmi_cpufreq_driver); if (ret) {