From 86d6725a572d08e5e709871a77a7df137adf5ad4 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Mon, 24 Jun 2013 15:36:33 +0800 Subject: [PATCH 1/2] ACPI / processor: Remove unused macros in processor_driver.c ACPI_PROCESSOR_FILE_INFO, ACPI_PROCESSOR_FILE_THROTTLING and ACPI_PROCESSOR_FILE_LIMIT are used for procfs, but this feature was removed in commit d09fe555 (ACPI processor: remove deprecated ACPI procfs I/F) long ago. So, these macros should also be removed. ACPI_PROCESSOR_LIMIT_USER and ACPI_PROCESSOR_LIMIT_THERMAL are not used by any code, remove them too. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki --- drivers/acpi/processor_driver.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index d93963f1e8f4..823be116619e 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -43,16 +43,10 @@ #define PREFIX "ACPI: " -#define ACPI_PROCESSOR_FILE_INFO "info" -#define ACPI_PROCESSOR_FILE_THROTTLING "throttling" -#define ACPI_PROCESSOR_FILE_LIMIT "limit" #define ACPI_PROCESSOR_NOTIFY_PERFORMANCE 0x80 #define ACPI_PROCESSOR_NOTIFY_POWER 0x81 #define ACPI_PROCESSOR_NOTIFY_THROTTLING 0x82 -#define ACPI_PROCESSOR_LIMIT_USER 0 -#define ACPI_PROCESSOR_LIMIT_THERMAL 1 - #define _COMPONENT ACPI_PROCESSOR_COMPONENT ACPI_MODULE_NAME("processor_driver"); From 09d5ca804e796a20dbc50be0971b9e89e692c256 Mon Sep 17 00:00:00 2001 From: Lan Tianyu Date: Tue, 25 Jun 2013 10:06:45 +0800 Subject: [PATCH 2/2] ACPI / processor: Drop unused variable from processor_perflib.c The count variable in acpi_processor_preregister_performance() is only initalized as 1 for one CPU and incremented when another CPU sharing the same dependency domain is found. It isn't referenced anywhere else, so drop it. Signed-off-by: Lan Tianyu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- 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 e854582f29a6..1e9732d809bf 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) {