From patchwork Thu Aug 20 07:56:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 248007 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp1135993ils; Thu, 20 Aug 2020 00:57:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPYbhTySFxC2IbZjL7/O+WFm9jxPckKxcEJ3wDvw0tb+zlxnP2UpV9I8jTwZqSLoPmfWPB X-Received: by 2002:a17:906:1392:: with SMTP id f18mr1979975ejc.521.1597910220859; Thu, 20 Aug 2020 00:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597910220; cv=none; d=google.com; s=arc-20160816; b=vDXojOm6O4WfPnOQ5jV1blRmAFmEgz2JnAsOcskakP3ClYqyTSnx3Wtw3AaUU9WAUs A3ZVXVcelbOUbHW70i9mhBluW6UiBiUjwOWk41EEuFlP+LYPbE9V7pEGDzMwAEi+AR2I Ia2RSKBLsQxABETtaBleaCBg36cJllEDxYW1yTiC368wmQbIj2x3Fhj0jnnp1lz0owe/ Bcys9lLYozKahbVjrfJiwE3RpQ5oEDSYg//MtAehHaPc3c9L5N6ImkhU7jXjAkFGKMbE s6Wqc8welqDtrdUyGn3ab1o7BxA7lJRU4wQBWgbHcUQbDMcd382Lz6qg7PJHtYAVMA0+ MDKg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MKa/l++NJX3mb6HDqlPH9HCmk5UKEoj8jJyL9pAVlUc=; b=JimmgkKv5j1i7zd8ulr9V8bHjqbt+9eZAgHBth3AcSP1yBv5MBSPwLDy6sFnvyOd/S jStVMau1rtBGYeqWzphFE3M0waRi0sSaIE+rye5YOoT1h8SIaZ/9b5usbSmp4uK5NvEb YB4vfllFl/J8xrEAhXWbnRXJ3gMLQSbbk17hIcBtuud/x7pSAtJ49rnC/bOfWi+KjiHB XXP76KCKJTWj5WS9Sy2SLCR/BBtn//+vbJJHlu7f8DfJrhgbO64VLaA/Kqk+fBr+A34n 2dPmmY3HndmdVTuTx323GVK7JhljjisTGnIMJIbmB/eVSnqaYIFKHD/S0ZimnnpTC1FX lutw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JOhKqnxX; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si880649eda.329.2020.08.20.00.57.00; Thu, 20 Aug 2020 00:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JOhKqnxX; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S1726968AbgHTH46 (ORCPT + 10 others); Thu, 20 Aug 2020 03:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726951AbgHTH4y (ORCPT ); Thu, 20 Aug 2020 03:56:54 -0400 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C5D7C061383 for ; Thu, 20 Aug 2020 00:56:53 -0700 (PDT) Received: by mail-pl1-x643.google.com with SMTP id y10so549287plr.11 for ; Thu, 20 Aug 2020 00:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MKa/l++NJX3mb6HDqlPH9HCmk5UKEoj8jJyL9pAVlUc=; b=JOhKqnxXyMfppUBIxlmvtEQlY5wB7zlwWW93yYoleBojKtOVakJwUIYj1ZKu4hzmZb EKEtrRsslpuOJ6lZJaqD+bqa4AbhVNuOyzF8abrRSlnfiLB1UstLmeV0AgLrLqMr7frF jZ7/sXrCNYPogK/+ohFMy/NlW0bTZ6dNRT/FIFnee66X/ZhU1eWzEPe7CqQ21fxnvvIo lJWQ5fdhyFNVMMVIGukrmECNfz/6JlWWOepDnc0ODoCBVC7C7ZnSP3D81+RgzZM3r2Fa NCf25h2gHBexgANYvR4Vsdbt3TNddA4eotdZtqvTC+OO+NpvXmNWzvPp8l2vAs0WNGWd Uqsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MKa/l++NJX3mb6HDqlPH9HCmk5UKEoj8jJyL9pAVlUc=; b=Bm8aotCCSV+7QoOur+ubTP9wPTJvTfzk/IQbydz/l63KR72PzNAlDjQT3nL2llSevZ didgwIT12XDw3KwKqhGPXymtBDKPmpEBdmuDjebo/mLxYX4sP01umfGx2GnEz2EL+BX7 c0541aNGGAOOlauVmUWlG631mD4NOr7OTIxHs5RcoATCceS5QhPVC343z7sx7jyO1Su3 5Li3CnL8LDF8cImQRggmEt7+0rawsOo+XX5D/DApQObskF+p0KfYbRwRMaCbsi3/wM/D 6NgxGz+0nZ3y+xt5AkUaXXx9cUl872k0omF1rdwIy8Ci2bVKtVnkbAF92eRnGgvpS/XZ iNMw== X-Gm-Message-State: AOAM532SB4eMJbn8XpiKwPs+HHVzIUYQDU10VYr8+PwJUGRRQCgAh4yM S+5EIYksqWhonQIZ9b0PUMH81g== X-Received: by 2002:a17:902:868b:: with SMTP id g11mr1739808plo.9.1597910212779; Thu, 20 Aug 2020 00:56:52 -0700 (PDT) Received: from localhost ([122.172.43.13]) by smtp.gmail.com with ESMTPSA id m19sm1596343pgd.21.2020.08.20.00.56.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2020 00:56:52 -0700 (PDT) From: Viresh Kumar To: rnayak@codeaurora.org, Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Rafael Wysocki , sibis@codeaurora.org, sbhanu@codeaurora.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 4/4] opp: Remove _dev_pm_opp_find_and_remove_table() wrapper Date: Thu, 20 Aug 2020 13:26:34 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af In-Reply-To: References: MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Remove the unnecessary wrapper and merge _dev_pm_opp_find_and_remove_table() with dev_pm_opp_remove_table(). Signed-off-by: Viresh Kumar --- drivers/opp/core.c | 21 ++++++++------------- drivers/opp/cpu.c | 2 +- drivers/opp/of.c | 2 +- drivers/opp/opp.h | 1 - 4 files changed, 10 insertions(+), 16 deletions(-) -- 2.25.0.rc1.19.g042ed3e048af diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 4edd2c3d6d91..6978b9218c6e 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -2395,7 +2395,14 @@ int dev_pm_opp_unregister_notifier(struct device *dev, } EXPORT_SYMBOL(dev_pm_opp_unregister_notifier); -void _dev_pm_opp_find_and_remove_table(struct device *dev) +/** + * dev_pm_opp_remove_table() - Free all OPPs associated with the device + * @dev: device pointer used to lookup OPP table. + * + * Free both OPPs created using static entries present in DT and the + * dynamically added entries. + */ +void dev_pm_opp_remove_table(struct device *dev) { struct opp_table *opp_table; @@ -2420,16 +2427,4 @@ void _dev_pm_opp_find_and_remove_table(struct device *dev) /* Drop reference taken while the OPP table was added */ dev_pm_opp_put_opp_table(opp_table); } - -/** - * dev_pm_opp_remove_table() - Free all OPPs associated with the device - * @dev: device pointer used to lookup OPP table. - * - * Free both OPPs created using static entries present in DT and the - * dynamically added entries. - */ -void dev_pm_opp_remove_table(struct device *dev) -{ - _dev_pm_opp_find_and_remove_table(dev); -} EXPORT_SYMBOL_GPL(dev_pm_opp_remove_table); diff --git a/drivers/opp/cpu.c b/drivers/opp/cpu.c index b5055cc886ef..5004335cf0de 100644 --- a/drivers/opp/cpu.c +++ b/drivers/opp/cpu.c @@ -124,7 +124,7 @@ void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask, continue; } - _dev_pm_opp_find_and_remove_table(cpu_dev); + dev_pm_opp_remove_table(cpu_dev); } } diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 0430290670ab..7d9d4455a59e 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -616,7 +616,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev, */ void dev_pm_opp_of_remove_table(struct device *dev) { - _dev_pm_opp_find_and_remove_table(dev); + dev_pm_opp_remove_table(dev); } EXPORT_SYMBOL_GPL(dev_pm_opp_of_remove_table); diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index 0c3de3f6db5c..78e876ec803e 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -217,7 +217,6 @@ void _get_opp_table_kref(struct opp_table *opp_table); int _get_opp_count(struct opp_table *opp_table); struct opp_table *_find_opp_table(struct device *dev); struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_table); -void _dev_pm_opp_find_and_remove_table(struct device *dev); struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table); void _opp_free(struct dev_pm_opp *opp); int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2);