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: 146518 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4546999ljw; Wed, 12 Sep 2018 01:30:13 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb0a2FlJhT5+0e6B8k7Xcj9gnuo3xHnQcp6VaVnVC9ACmKc6UoI9ZxX13T0JX3kQ8zWU5Gy X-Received: by 2002:a62:2f84:: with SMTP id v126-v6mr922614pfv.115.1536741013508; Wed, 12 Sep 2018 01:30:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536741013; cv=none; d=google.com; s=arc-20160816; b=sunl01HAr8MsdENmheU9JblvmTvwYBPDO6DL+uGC8K3IvZ5Vd22wOwPsrfo197oPY2 sNsS96QRRxHCiHJcZWpL0oiXu3au7zzmucWApNr/Nkd6JCArpLV1SJTCl758o0fNlYyd Lhkik2V31JyiH6L5sydMtQ2Q5Q3MGDE9vrHPQ7GEouZ2X5hlO5naQAShoSJ9Bow5VgGO rOrkq89ciaCKFiBdpigzklG4dx5rdM+np2ilqjNTJiPV1pdrhNJ7bHmPXfjmuv1cN05o z9PvrcygaGi1mnzvozw/iEpFOzDA5I9pCk+b34YHbHaHzbiFuCmOpyXKos67DZiC4T6Y pYLg== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=6pZdqzyNFzV9hoYXx9iwC3ap2vB1NU1hBlJF3aGozkE=; b=mu274G2gWSBwvkUyzRMGAM3pkqtLxj66sMUWcmTjjMC0vqSQubcFpgeeGsHbNgAE/2 59JtV8RqLB1rcoAqgGGim0fuztxVlvOkdyAOyCa544Mtl5jtNUjHtzWeqPw1GMBlJY9Y 4D+y5BHDCrG/xAP7xzy4go2yORUbl6pW4c/gmjgBoP2MqfJecSL03U5hVhLkdFk+n07x 2bpNjOaFmFkRGZi96uJvn3maWCgKFA9dlgLpxWGODLqyCP68KP5b2TToBZhs7uq8dpmQ 92riuuB9gv3MXTpRWiZZRmaRO08gpPdULwsR9pXOLFpLLwSwCDMz1Pw7uqJf7eo0o3sJ BSBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BnFj8fwJ; 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 k4-v6si348600pfc.328.2018.09.12.01.30.13; Wed, 12 Sep 2018 01:30:13 -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=BnFj8fwJ; 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 S1728162AbeILNdi (ORCPT + 32 others); Wed, 12 Sep 2018 09:33:38 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:41589 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728122AbeILNdg (ORCPT ); Wed, 12 Sep 2018 09:33:36 -0400 Received: by mail-pf1-f193.google.com with SMTP id h79-v6so643333pfk.8 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=glTGQEriDgNHdDIEQkOgb0L7w+y9sTyYcldwbZSY6gKZ+qrfEQ1r+3LdC0okaECDAM Zo6gdVm7D3kA7T1bZ/dbyCaHQqq+tJGQ1BAQ2Wf857NYbzl2F6ZZO6635B4c9lPnlXUT +wCqgqQdRk3LEOL5sbiF8QF506RoONHYKBE4Z/3/8jZdHdWttCS9Qdqoo57PsiIQhoNI 9DucAs7T2uEwkqtszG/NJnSt7owrd0ze7Vi6cdWMabT26GAxMcaTGd1K3cGxyz+nO1WJ OksyGECs5dsV2PpKd04fAhMEE5+7cRkq31SdiLBCutE3XeqYEjsvWaOzMZKNzPDkIzhA pH2g== X-Gm-Message-State: APzg51DwxiTygIV0uw20RezBIS74ALxvYZHodY2as2M13dryErM6+hWZ kg2HF3LZtTEfZNhoMYLNRblDyg== 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" 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 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: 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(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/mvebu-cpufreq.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.18.0.rc1.242.g61856ae69a2c 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);