From patchwork Wed Sep 19 22:20:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10606631 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 E3456913 for ; Wed, 19 Sep 2018 22:21:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1F362C9BC for ; Wed, 19 Sep 2018 22:21:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C61572CC9A; Wed, 19 Sep 2018 22:21:45 +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 4EAE42C9BC for ; Wed, 19 Sep 2018 22:21:45 +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=VxfYsfaSGQnLmiSoBIgUO6FMXia2RMjc/gpbnlWKcW4=; b=gIv+A8D3/88l0lV4XcuAKch7XZ OtKmVJLXosmsp2yf3xOIgpvPlMVB+h7hyBGFFdxHr8J/v16QF8ZJFPEJnLoLm9re0dktiN/0GdfzO FfbSPU5lF6gOth6p9mRAb587ZxtrrumxVogKo5pvo8L5mYQ4//451ZNBbn1ln41kYL6ej9Ugcy2UC AgNaCJB38Gm5/JJ7xWFtiHTkqA6K07F44BahKHmYutW9jQ1ujEdJnxnUDbYrDj0EQqaDF/JkJKvzA tkCb/8zJ5m4PAkEtuXWCuuT5Syv2lVghwRF5NFH4r5/MqFktmlpvL8yDDUDZu+vhvJQe+e0aAFkGh 0RuHrymA==; 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 1g2kqg-00069m-Nx; Wed, 19 Sep 2018 22:21:30 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g2kqH-0005rf-PZ for linux-arm-kernel@lists.infradead.org; Wed, 19 Sep 2018 22:21:18 +0000 Received: by mail-pf1-x444.google.com with SMTP id d4-v6so3362393pfn.0 for ; Wed, 19 Sep 2018 15:20:55 -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 :in-reply-to:references; bh=25gV/yr+DQaieOUd7LXdpHMVharUDBC9tXEOJxeQeO8=; b=Djc6bI6BMMVojfSs9W39ToJZ753bA6PsqPD81ey1/C6zHiIfxmZW6YnXtHhub/fUNm 7HMSwb/5oxeFPv89MelgsJ76rIoRbPpkKQjuQSkDhXcmrMVXJXFvLri/s5j7QEj5CvVv Y5Tty7RqTw+A7oAp+29XLZVaByP+2HFlecf5c= 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:in-reply-to:references; bh=25gV/yr+DQaieOUd7LXdpHMVharUDBC9tXEOJxeQeO8=; b=PTthJp/3p4RZaDUtQoGHM/IqClc2sM9x91Ms9yZokb9ExjvkLHvZxfyUBjL1BZ6fV+ Omc0BwnzVaP/XGll8fJh1BwHNSX7cWmmWBeFO+jytA9ppVVGv7/rZ4t2Tajj2D485trS Qlkr3llKhleDROlY4JLYrqX4D3k2V6U9sTV3wpPnC7CDyqkAyN1L6J+INgKQLbo2osGv KRx8YCfT/kyH5NIkFgtX3KAXYBR7P0QzLNQEBtlHIBEgkT0rz1GRn1SG+h0mUr06HhfA ZVEdm7kLkayCky5nMCl1JkvJO25gPIGtF7Y8Xjiv2cG7MbpknJLLVhKKW5zxVWGPdnqA awAQ== X-Gm-Message-State: APzg51Cox6tOnukpdICjA9yhOm3+iHpO/NSWlGH7uno/7ZMbJNEQCrQ3 DUwIMONshcAiLahOMu/dI7nqGw== X-Google-Smtp-Source: ANB0VdbnIvHZfHKwjt12/ZMC4gDh+MnJZSinZAWMt77a/ti42fjrtALCbyoQD6ymS14FPdNT8bPyeg== X-Received: by 2002:a63:26c6:: with SMTP id m189-v6mr33939143pgm.70.1537395655114; Wed, 19 Sep 2018 15:20:55 -0700 (PDT) Received: from localhost ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id k23-v6sm23996094pgl.42.2018.09.19.15.20.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Sep 2018 15:20:54 -0700 (PDT) From: Viresh Kumar To: Jason Cooper , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , "Rafael J. Wysocki" Subject: [PATCH V2 08/12] cpufreq: mvebu: Remove OPPs using dev_pm_opp_remove() Date: Wed, 19 Sep 2018 15:20:27 -0700 Message-Id: <883071c4bd9a6e45bf0b5e45575d110eaeb2e6d0.1537394233.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180919_152105_872142_AE3C2EF4 X-CRM114-Status: GOOD ( 14.07 ) 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(). Reviewed-by: Gregory CLEMENT Signed-off-by: Viresh Kumar --- 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);