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: 147055 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1233050ljw; Wed, 19 Sep 2018 15:21:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ5NiEWBNAaMK9igEBQQ59h31javtlYl0x61a59gURQJuJmPNhkVE9yKcgLv0hp83O7Bsko X-Received: by 2002:a65:5545:: with SMTP id t5-v6mr33923867pgr.157.1537395660219; Wed, 19 Sep 2018 15:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537395660; cv=none; d=google.com; s=arc-20160816; b=paoTYUM/kNePngYbQ0ve2E0ANk7G8gthNu8lsaEau7DfvApHQP0Nw2sdEwnhTpRu/2 a5AG/khcI3WnoeOrayWfiiD2WVKUXHZiMWB2sfCHGyAj6ytME8yOjGEsrXvmuG1o8MyF blN3MaM50cnJNoEhZQRdzLMnaUDQmE/NLwxfzjxRUiHuQ6+H2PqL8xlZK4fe3TQCP7l4 osn8cxF9PeccGo4Wnd+ZBJsV89HDP1HaXm3R6au3k0hAnvrg04IUOqhrzujgDsXj1DEg InZp9AyyV/brHvHLvfn5YjEvGjZWIPLl6JNiEmhG/XyhXQtxtH8TYgqINO16CyRdEXVx djpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=25gV/yr+DQaieOUd7LXdpHMVharUDBC9tXEOJxeQeO8=; b=sHk83KgmVwsReU3MNa+sNiciAtJ6GNlAStk4aR9DFP19Auppy3yr7GvabDwbAzl+1a 5ujr0Fq+KGcylQmqnAZXHnQdFFQ9pz+oSNvFlnVD0wjCgzfm5r57lxfYIKM/2qQ48Orb h5b6hpHZOPz0D12xhZ44Sm1i5k6ElJmx6WveWLbt8LKXn4Eg/XZ84gQCyQIqk7YuZIOu VLENWHBVy+TdYrQ4gT0/ZsvkQCY7kw0f2IgbYkROpi+PdIvY40P0XcJAFENvEDQu/Awg EJ2b1zMaqutMc5pjQbYRATtTEIDNgidVLJ/GI3f8OGp0yMYGgSo5fGFOd7572ypaq2hA ed+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Djc6bI6B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8-v6si22034915pgl.101.2018.09.19.15.20.59; Wed, 19 Sep 2018 15:21:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Djc6bI6B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2387455AbeITEA4 (ORCPT + 32 others); Thu, 20 Sep 2018 00:00:56 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38615 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387400AbeITEA4 (ORCPT ); Thu, 20 Sep 2018 00:00:56 -0400 Received: by mail-pf1-f196.google.com with SMTP id x17-v6so3349369pfh.5 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=WzxdcVJ0JzChuxJbfshNR+qeeVuCuK1MZBMZKnW0zIeKbfz0RA6zayTlqLcRohTe5+ Jv3msIXp/75LIhbz75ZVXFOWIeExPhtOqbplJ/QJnS2+/FdBMlcT3eR+lyNIr6xn1ac1 rKWS+jANNzi6n+yuVAXijld5sAp78xYdHl+TDy89SasAV7lsQHOdOqxe+Y0HHXYMhgMt 8vQJ0QsV9r6yKL1Veug9EMPmkeXRjKGEFk6Rsu/II93NJ+cgV4Ouzx7JUBXOKAGq3CW8 s2QhnyN2mR2S/yjGI6ef+3SxToRXg7xP/bBBVJEJ/5gMqmY0ywS4xezYQEkaNWpMYsK6 fhSA== X-Gm-Message-State: APzg51D3dREZbpqhdshr2Zt7ZsWe+NwUUJfjUeNU/YQ5rO1uUipDI0jN TXnpeqAPfqhKb3rUF3VUDvjnSg== 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" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Stephen Boyd , Nishanth Menon , Vincent Guittot , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.14.1 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);