linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI/Processor: Clear unuseful variable count in the acpi_processor_preregister_performance()
@ 2013-06-25  2:06 Lan Tianyu
  2013-06-25  2:06 ` [PATCH 2/2] CPUFreq: Add new sysfs attribute freqdomain_cpus for acpi-freq driver Lan Tianyu
  2013-06-25  7:45 ` [PATCH 1/2] ACPI/Processor: Clear unuseful variable count in the acpi_processor_preregister_performance() Viresh Kumar
  0 siblings, 2 replies; 16+ messages in thread
From: Lan Tianyu @ 2013-06-25  2:06 UTC (permalink / raw)
  To: rjw, lenb, viresh.kumar; +Cc: Lan Tianyu, linux-acpi, linux-pm, cpufreq

The variable count in the acpi_processor_preregister_performance() is only initalized
as one for one cpu and increased by one when find another cpu that share same dependency
domain. Otherwise, it isn't referenced somewhere else.

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
 drivers/acpi/processor_perflib.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index e854582..1e9732d 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -639,7 +639,7 @@ end:
 int acpi_processor_preregister_performance(
 		struct acpi_processor_performance __percpu *performance)
 {
-	int count, count_target;
+	int count_target;
 	int retval = 0;
 	unsigned int i, j;
 	cpumask_var_t covered_cpus;
@@ -711,7 +711,6 @@ int acpi_processor_preregister_performance(
 
 		/* Validate the Domain info */
 		count_target = pdomain->num_processors;
-		count = 1;
 		if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
 			pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL;
 		else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL)
@@ -745,7 +744,6 @@ int acpi_processor_preregister_performance(
 
 			cpumask_set_cpu(j, covered_cpus);
 			cpumask_set_cpu(j, pr->performance->shared_cpu_map);
-			count++;
 		}
 
 		for_each_possible_cpu(j) {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-06-26  6:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25  2:06 [PATCH 1/2] ACPI/Processor: Clear unuseful variable count in the acpi_processor_preregister_performance() Lan Tianyu
2013-06-25  2:06 ` [PATCH 2/2] CPUFreq: Add new sysfs attribute freqdomain_cpus for acpi-freq driver Lan Tianyu
2013-06-25  3:56   ` Viresh Kumar
2013-06-25  6:54     ` Lan Tianyu
2013-06-25  7:48       ` Viresh Kumar
2013-06-25  8:19         ` Lan Tianyu
2013-06-25 15:31           ` Viresh Kumar
2013-06-25 23:03             ` Rafael J. Wysocki
2013-06-26  2:41               ` Lan Tianyu
2013-06-26  6:54                 ` Viresh Kumar
2013-06-26  6:57                   ` Lan Tianyu
2013-06-25 23:02           ` Rafael J. Wysocki
2013-06-26  2:17             ` Lan Tianyu
2013-06-25  7:45 ` [PATCH 1/2] ACPI/Processor: Clear unuseful variable count in the acpi_processor_preregister_performance() Viresh Kumar
2013-06-25  8:42   ` Lan Tianyu
2013-06-25 22:58     ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).