mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Juri Lelli <juri.lelli@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	linux@arm.linux.org.uk, Will Deacon <will.deacon@arm.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	arnd.bergmann@linaro.org, linux-kernel@vger.kernel.org
Subject: [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done"
Date: Wed, 21 Jun 2017 10:16:40 +0530	[thread overview]
Message-ID: <3cb2fa07035f9333eeaaee3eab37d090777abb99.1498019799.git.viresh.kumar@linaro.org> (raw)
In-Reply-To: <cover.1498019799.git.viresh.kumar@linaro.org>
In-Reply-To: <cover.1498019799.git.viresh.kumar@linaro.org>

We can reuse "cap_parsing_failed" instead of keeping an additional
variable here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/base/arch_topology.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
index d1c33a85059e..8239a6232808 100644
--- a/drivers/base/arch_topology.c
+++ b/drivers/base/arch_topology.c
@@ -161,7 +161,6 @@ int __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu)
 
 #ifdef CONFIG_CPU_FREQ
 static cpumask_var_t cpus_to_visit;
-static bool cap_parsing_done;
 static void parsing_done_workfn(struct work_struct *work);
 static DECLARE_WORK(parsing_done_work, parsing_done_workfn);
 
@@ -173,7 +172,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
 	struct cpufreq_policy *policy = data;
 	int cpu;
 
-	if (cap_parsing_failed || cap_parsing_done)
+	if (cap_parsing_failed)
 		return 0;
 
 	switch (val) {
@@ -193,7 +192,7 @@ init_cpu_capacity_callback(struct notifier_block *nb,
 			topology_normalize_cpu_scale();
 			kfree(raw_capacity);
 			pr_debug("cpu_capacity: parsing done\n");
-			cap_parsing_done = true;
+			cap_parsing_failed = true;
 			schedule_work(&parsing_done_work);
 		}
 	}
-- 
2.13.0.71.gd7076ec9c9cb

  reply	other threads:[~2017-06-21  4:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-21  4:46 [PATCH V2 0/5] arch_topology: Minor cleanups Viresh Kumar
2017-06-21  4:46 ` Viresh Kumar [this message]
2017-06-22  9:44   ` [PATCH V2 1/5] arch_topology: Get rid of "cap_parsing_done" Juri Lelli
2017-06-22 14:29     ` Viresh Kumar
2017-06-22 16:44       ` Juri Lelli
2017-06-21  4:46 ` [PATCH V2 2/5] arch_topology: Don't break lines unnecessarily Viresh Kumar
2017-06-21  4:46 ` [PATCH V2 3/5] arch_topology: Covert switch block to if block Viresh Kumar
2017-06-21  4:46 ` [PATCH V2 4/5] arch_topology: Return 0 or -ve errors from topology_parse_cpu_capacity() Viresh Kumar
2017-06-22  9:39   ` Juri Lelli
2017-06-22 14:28     ` Viresh Kumar
2017-06-22 16:43       ` Juri Lelli
2017-06-21  4:46 ` [PATCH V2 5/5] arch_topology: Localize cap_parsing_failed to topology_parse_cpu_capacity() Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cb2fa07035f9333eeaaee3eab37d090777abb99.1498019799.git.viresh.kumar@linaro.org \
    --to=viresh.kumar@linaro.org \
    --cc=arnd.bergmann@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=juri.lelli@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=vincent.guittot@linaro.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®