Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3142496rdh; Mon, 27 Nov 2023 07:20:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHutwDfGdSrCm1ZoE1N67PTMY3+mwNf0XXj8vkQCJpbcHWa7qJICM9F3dxKXnjczc21AIYK X-Received: by 2002:a05:6a20:2447:b0:18c:23b0:3b0e with SMTP id t7-20020a056a20244700b0018c23b03b0emr10360687pzc.21.1701098401552; Mon, 27 Nov 2023 07:20:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701098401; cv=none; d=google.com; s=arc-20160816; b=z0/1UZSIYGQkvPqYQZYUMr8XVtADHrGYj5IvdNh8rs64JhMujIkL5CemFftvUv/e5e vqU/GJJ8hzRNy2EfGTinVPGDcxKu8OYy4TI0F8N81doDtYvI43alMlNX+e7Dwn8prMIO a5qD19QPQ7DslSAUafAHJaUhrNDBTFmyXJj8zImti7caWd6ms1VgyU/XukwZr4qo+O2Z rYKHxwwub8MTyEbSI87thaL8jYAr3AQtaF/6/dH12zR63eIz9I1ifqFbjceNOAN0T8xA 9NP5rK1oX48dHiMQQhZyQDsv97wT51jlLJryN1+qOAViO7vMEsPgXXDDtQPmGKaT/CYV hKqA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=CQ41arVcAuG43JZqYRRYkpgAWKlZs6YO605nhsMazRg=; fh=ttykoA0f7E6o/pJ4snmHRrLTBzR6OsprBLV8Y3NrH0I=; b=m5fl3E3BRSbgJfFhDX9Wc2ctDNGQXrJs1Igt9H2rJKSvclkzdLlX+SNOFjk+mEdUVy 20K4J87ib7pSXdxSwmNSuUXYoj0BkdC+MA9QPNthZPTavzHatWO2Gx1cfMPT4W2RdcLE +5aeOdPcRa3d0NJ4ku74K4a+I4UB3gn2SsjvJs6x4zBogqw/QPw6eHKcWQSO4JJOZj5I QVHSk9tCE96nbcd5mgvlbHPNgeA2qMdEtLUGfx030x0jopi9X2cVCGL9VYOjRezzcmCq UeiVmEqXa6eucXYxcnwQ3Bm6jdyVRJ7z0nr1/kKkRsmdYgy1hbpKlHfj1l/cQqQhwvVr fcJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v677vaar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a22-20020a631a56000000b005b9755fd511si10046786pgm.182.2023.11.27.07.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:20:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v677vaar; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3A30B80B6307; Mon, 27 Nov 2023 07:19:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233901AbjK0PTk (ORCPT + 99 others); Mon, 27 Nov 2023 10:19:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233904AbjK0PTj (ORCPT ); Mon, 27 Nov 2023 10:19:39 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8C2D0 for ; Mon, 27 Nov 2023 07:19:45 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5079f3f3d7aso6213266e87.1 for ; Mon, 27 Nov 2023 07:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701098383; x=1701703183; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CQ41arVcAuG43JZqYRRYkpgAWKlZs6YO605nhsMazRg=; b=v677vaar2lyjPuA8ZSFU5/CskWsfVobXQA6tXFK9nk3Xes/HIpCGD7Xrjk2Kmtk1JL N+E5Sp+FhDdEP5QkUyDizRuYql4kexFpZC3pHKod0+Q+DKYbkrmjXbWJ+Hi2+DdYzbFu s7iJmDbVW7XxfeC0bKQ4NRAD94S5tsHSFBek8qv5FRHH64XtNXvgxSWCJ9VjUvNR/JWG 06GlBblij2zAhT4Poq1RENOCuXdfUvQq6C7H4t1rcdkQd7Qo+kDmEWjKoXPuMevwMKZd SKsTo+bQte8Q062iNb9hyhkaZCGoiZdq+Q2Yg9BpcCMuP5zzCgB4RlKaZeG9QoFVyXVE sf4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701098383; x=1701703183; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CQ41arVcAuG43JZqYRRYkpgAWKlZs6YO605nhsMazRg=; b=Q34hOprPjsAoZwe84EEcxdY37nCPaO/Exm+Hzb6GgxfoAyREYPkC+2tAuT7L2Jpmha VtkpZlE+Ko1i4A3sWEtoaOQ6RtdmXde2/kpsa5cfe2aj8FHVo+5JKZt+LPg0NXskyuU+ foJix+iOArw8EzOU6T8rlPnFpvCTClaMjOvPRfZPRYBX2BYtrkaF9tXQskRVhpaEpTSe SlQdwBQ6bIgaGkMkK4PN6zYOc/ZJuLFY3MDesFnhFjlRiKXYa0ehfEqtDsGD35hIm06Z Iqn05gtSRZe6+InawOQr1qqVgwKBbWkk22l26MHE7VH8FhuXLBaKTTvzqhsvEPgTZnTE 0Ybw== X-Gm-Message-State: AOJu0YwZ3si/HuboBT46a//FnwZ5Z3uqFChn5rOGtUJnS0xEnYJC3m/O Al38sfJm7tbFKokBGJwm40Xo0Q== X-Received: by 2002:a2e:8196:0:b0:2bc:c004:cc22 with SMTP id e22-20020a2e8196000000b002bcc004cc22mr8315420ljg.33.1701098383440; Mon, 27 Nov 2023 07:19:43 -0800 (PST) Received: from uffe-tuxpro14.. (h-178-174-189-39.A498.priv.bahnhof.se. [178.174.189.39]) by smtp.gmail.com with ESMTPSA id j17-20020a2e8011000000b002b6c61bac2esm1371363ljg.92.2023.11.27.07.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:19:42 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Kevin Hilman , Ulf Hansson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] PM: domains: Drop the unused pm_genpd_opp_to_performance_state() Date: Mon, 27 Nov 2023 16:19:31 +0100 Message-Id: <20231127151931.47055-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 07:19:57 -0800 (PST) Since commit 7c41cdcd3bbe ("OPP: Simplify the over-designed pstate <-> level dance"), there is no longer any users of the pm_genpd_opp_to_performance_state() API. Let's therefore drop it and its corresponding ->opp_to_performance_state() callback, which also no longer has any users. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 32 -------------------------------- include/linux/pm_domain.h | 12 ------------ 2 files changed, 44 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index da1777e39eaa..cf65b5a9783c 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -3042,38 +3042,6 @@ int of_genpd_parse_idle_states(struct device_node *dn, } EXPORT_SYMBOL_GPL(of_genpd_parse_idle_states); -/** - * pm_genpd_opp_to_performance_state - Gets performance state of the genpd from its OPP node. - * - * @genpd_dev: Genpd's device for which the performance-state needs to be found. - * @opp: struct dev_pm_opp of the OPP for which we need to find performance - * state. - * - * Returns performance state encoded in the OPP of the genpd. This calls - * platform specific genpd->opp_to_performance_state() callback to translate - * power domain OPP to performance state. - * - * Returns performance state on success and 0 on failure. - */ -unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev, - struct dev_pm_opp *opp) -{ - struct generic_pm_domain *genpd = NULL; - int state; - - genpd = container_of(genpd_dev, struct generic_pm_domain, dev); - - if (unlikely(!genpd->opp_to_performance_state)) - return 0; - - genpd_lock(genpd); - state = genpd->opp_to_performance_state(genpd, opp); - genpd_unlock(genpd); - - return state; -} -EXPORT_SYMBOL_GPL(pm_genpd_opp_to_performance_state); - static int __init genpd_bus_init(void) { return bus_register(&genpd_bus_type); diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 34663d0d5c55..b97c5e9820f9 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -118,7 +118,6 @@ struct genpd_power_state { }; struct genpd_lock_ops; -struct dev_pm_opp; struct opp_table; struct generic_pm_domain { @@ -146,8 +145,6 @@ struct generic_pm_domain { int (*power_on)(struct generic_pm_domain *domain); struct raw_notifier_head power_notifiers; /* Power on/off notifiers */ struct opp_table *opp_table; /* OPP table of the genpd */ - unsigned int (*opp_to_performance_state)(struct generic_pm_domain *genpd, - struct dev_pm_opp *opp); int (*set_performance_state)(struct generic_pm_domain *genpd, unsigned int state); struct gpd_dev_ops dev_ops; @@ -348,8 +345,6 @@ int of_genpd_remove_subdomain(struct of_phandle_args *parent_spec, struct generic_pm_domain *of_genpd_remove_last(struct device_node *np); int of_genpd_parse_idle_states(struct device_node *dn, struct genpd_power_state **states, int *n); -unsigned int pm_genpd_opp_to_performance_state(struct device *genpd_dev, - struct dev_pm_opp *opp); int genpd_dev_pm_attach(struct device *dev); struct device *genpd_dev_pm_attach_by_id(struct device *dev, @@ -395,13 +390,6 @@ static inline int of_genpd_parse_idle_states(struct device_node *dn, return -ENODEV; } -static inline unsigned int -pm_genpd_opp_to_performance_state(struct device *genpd_dev, - struct dev_pm_opp *opp) -{ - return 0; -} - static inline int genpd_dev_pm_attach(struct device *dev) { return 0; -- 2.34.1