linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lan Tianyu <tianyu.lan@intel.com>
To: rjw@sisk.pl, lenb@kernel.org, viresh.kumar@linaro.org
Cc: Lan Tianyu <tianyu.lan@intel.com>,
	linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org,
	cpufreq@vger.kernel.org
Subject: [PATCH 1/2] ACPI/Processor: Clear unuseful variable count in the acpi_processor_preregister_performance()
Date: Tue, 25 Jun 2013 10:06:45 +0800	[thread overview]
Message-ID: <1372126006-4950-1-git-send-email-tianyu.lan@intel.com> (raw)

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


             reply	other threads:[~2013-06-25  2:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  2:06 Lan Tianyu [this message]
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

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=1372126006-4950-1-git-send-email-tianyu.lan@intel.com \
    --to=tianyu.lan@intel.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=viresh.kumar@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).