From patchwork Wed Sep 12 08:28:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10597079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45FCE112B for ; Wed, 12 Sep 2018 08:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3214829580 for ; Wed, 12 Sep 2018 08:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 247CD29970; Wed, 12 Sep 2018 08:31:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A8A8A2995B for ; Wed, 12 Sep 2018 08:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=5GxnQ42zjxW/R3wQeGYG9lMay1Gpxm/ZwS9NWInwnGs=; b=AWKTE2WiQRF7cLgXhjZSzljoSg pt+N2bGQEpzmVLV4Gs6d8FPceHXPcJbnI4tZNf8D6prGR6qRN2lzdVkuZ+UlCl0+cIaGn4Sw3GBw8 sqG3Ty/hBWciD77UVh3N1OWpjEE45rhm77JuVfqzaoU1LFaJBYEm8briIKq2uvM0Um2jxTQoMN91j kdXWzw29erZz+KFbfk0JSY8gpenllxmpI6phUglzjCqNXVwhbUKskDuLnvIHwzcFcCAh8nSvZ3Bhl BxeaiB3ZLjTFJI3PqHePc+Oagx3DE3us/c2nsrszxPKg+DNLFauKyQfC71qYKizkKZrB0iRumEHa+ zrao9C7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g00Ym-0001Rm-TG; Wed, 12 Sep 2018 08:31:40 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g00XT-0008I0-Mz for linux-arm-kernel@lists.infradead.org; Wed, 12 Sep 2018 08:30:46 +0000 Received: by mail-pf1-x443.google.com with SMTP id k21-v6so637243pff.11 for ; Wed, 12 Sep 2018 01:30:09 -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; bh=6pZdqzyNFzV9hoYXx9iwC3ap2vB1NU1hBlJF3aGozkE=; b=BnFj8fwJnhndXq1Pp4qGfFt1Rh5us1B1XFwLDGN6iRpdghqXxBb4SEtSEulWyWZi74 Uv7rCQrAqz6+ogMqmFwQShCcuIdOTJS9Jbm+QVqp62D8lgw4CLZ1sMC8gZQAM/RZvCdG c7sD4CSSgHMJxZz4yS9aDQgyVkPPiO1+Mo5JU= 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; bh=6pZdqzyNFzV9hoYXx9iwC3ap2vB1NU1hBlJF3aGozkE=; b=NfBwzWAWbERB1JL4VU3gmA1NulC6U+549cjUEEGALz6BvxGUvU4die/04BFrtyl0L5 pw4XaWztvzOxJ87d/MLiKDZSaEJC1hMKpxx0EAwlR7CtWGS+8DZgR9935+c6IzAtgzwL C1RqR54ZJVgUes2h1/zNYCKD6cdL7wBHsf/D9EQ26HLol9m9jyhHIn2tRJ3ajr1hiaZH bgR0NAiCHLLkDv976BQtOpQmFTuRK6wzDtyOWr5njcoDDoNsrNvdMhB0A8hok2gEqDWQ 08DpoPWBA8sUL+Lb4zZ8fs25O3tNguMUrugn8hzEFTiLJmI0e0So8kp2x+vDFQ/I2Cvk 5RNA== X-Gm-Message-State: APzg51CBM395oMs1cOywM7U+GhbOwUe8lSc0CHJn5rCMxBDiuKV1U/Ul YtQsRHUTBJaiU9sVNstwIi6kzA== X-Google-Smtp-Source: ANB0VdY0ib/62jVG2gz+hs6NFsmjxcJiGyqXdsFTiw6b3Mqp3bqtoaczwNPj8V/E/jrKzB+iLI0fzw== X-Received: by 2002:a63:e949:: with SMTP id q9-v6mr914185pgj.4.1536741008837; Wed, 12 Sep 2018 01:30:08 -0700 (PDT) Received: from localhost ([122.171.64.45]) by smtp.gmail.com with ESMTPSA id w69-v6sm686923pgd.37.2018.09.12.01.30.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 01:30:08 -0700 (PDT) From: Viresh Kumar To: niklas.cassel@linaro.org, Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , "Rafael J. Wysocki" Subject: [PATCH 07/11] cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() Date: Wed, 12 Sep 2018 13:58:46 +0530 Message-Id: X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180912_013019_933756_785451F1 X-CRM114-Status: GOOD ( 13.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Vincent Guittot , linux-pm@vger.kernel.org, Stephen Boyd , Viresh Kumar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP dev_pm_opp_cpumask_remove_table() is going to change in the next commit and will not remove dynamic OPPs automatically. They must be removed with a call to dev_pm_opp_remove(). Signed-off-by: Viresh Kumar Reviewed-by: Gregory CLEMENT --- drivers/cpufreq/mvebu-cpufreq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/mvebu-cpufreq.c b/drivers/cpufreq/mvebu-cpufreq.c index 31513bd42705..6d33a639f902 100644 --- a/drivers/cpufreq/mvebu-cpufreq.c +++ b/drivers/cpufreq/mvebu-cpufreq.c @@ -84,9 +84,10 @@ static int __init armada_xp_pmsu_cpufreq_init(void) ret = dev_pm_opp_add(cpu_dev, clk_get_rate(clk) / 2, 0); if (ret) { + dev_pm_opp_remove(cpu_dev, clk_get_rate(clk)); clk_put(clk); dev_err(cpu_dev, "Failed to register OPPs\n"); - goto opp_register_failed; + return ret; } ret = dev_pm_opp_set_sharing_cpus(cpu_dev, @@ -99,11 +100,5 @@ static int __init armada_xp_pmsu_cpufreq_init(void) platform_device_register_simple("cpufreq-dt", -1, NULL, 0); return 0; - -opp_register_failed: - /* As registering has failed remove all the opp for all cpus */ - dev_pm_opp_cpumask_remove_table(cpu_possible_mask); - - return ret; } device_initcall(armada_xp_pmsu_cpufreq_init);