ACPI/Processor: Remove acpi_processor_get_limit_info()
Subsystems (2)
PATCH 1/1 ACPI/Processor: Remove acpi_processor_get_limit_info()
From: Lan Tianyu <[email protected]>
acpi_processor_get_limit_info() is only called in the __acpi_processor_start() and what it does actually is just to check pr->flags.throttling and set limit. The pr pointer has been checked in the __acpi_processor_start() before acpi_processor_get_limit_info() being called. It doesn't make sense still to keep it as a function. So move code to __acpi_processor_start() and remove acpi_processor_get_limit_info().
--- drivers/acpi/processor_driver.c | 4 +++- drivers/acpi/processor_thermal.c | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-)
drivers/acpi/processor_driver.c +3 -1
@@ -175,7 +175,9 @@ static int __acpi_processor_start(struct acpi_device *device)acpi_processor_load_module (pr);#endif acpi_processor_get_throttling_info (pr); -acpi_processor_get_limit_info (pr); + +if (pr->flags.throttling) + pr->flags.limit =1 ;if (!cpuidle_get_driver () ||cpuidle_get_driver () == &acpi_idle_driver)acpi_processor_power_init (pr);
drivers/acpi/processor_thermal.c +0 -12
@@ -186,18 +186,6 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)#endif -int acpi_processor_get_limit_info (struct acpi_processor *pr) -{ - -if (!pr) -return -EINVAL ; - -if (pr->flags.throttling) - pr->flags.limit =1 ; - -return 0 ; -} -/* thermal coolign device callbacks */ static int acpi_processor_max_state (struct acpi_processor *pr) {
Signature · 1 line
1.8.4.rc0.1.g8f6a3e5.dirty
Quoted 10 lines · On 二, 2013-08-13 at 10:07 +0800, [email protected] wrote:
From: Lan Tianyu <[email protected]>
acpi_processor_get_limit_info()is only called in the__acpi_processor_start()and what it does actually is just to checkpr->flags.throttlingand set limit. The pr pointer has been checked in the__acpi_processor_start()beforeacpi_processor_get_limit_info()being called. It doesn't make sense still to keep it as a function. So move code to__acpi_processor_start()and removeacpi_processor_get_limit_info().Signed-off-by Lan Tianyu <[email protected]>
thanks,
rui
Quoted 33 lines
--- drivers/acpi/processor_driver.c | 4 +++- drivers/acpi/processor_thermal.c | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-)drivers/acpi/processor_driver.c +3
-1@@ -175,7 +175,9 @@ static int __acpi_processor_start(struct acpi_device *device)acpi_processor_load_module (pr);#endif acpi_processor_get_throttling_info (pr); -acpi_processor_get_limit_info (pr); + +if (pr->flags.throttling) + pr->flags.limit =1 ;if (!cpuidle_get_driver () ||cpuidle_get_driver () == &acpi_idle_driver)acpi_processor_power_init (pr);drivers/acpi/processor_thermal.c +0
-5@@ -186,18 +186,6 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)#endif -int acpi_processor_get_limit_info (struct acpi_processor *pr) -{ - -if (!pr) -return -EINVAL ;
drivers/acpi/processor_thermal.c static int cpufreq_set_cur_state(unsigned int cpu, int state) · line 191
Quoted 10 lines
drivers/acpi/processor_thermal.c +0
-7- -if (pr->flags.throttling) - pr->flags.limit =1 ; - -return 0 ; -} -/* thermal coolign device callbacks */ static int acpi_processor_max_state (struct acpi_processor *pr) {
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Zhang Rui
Quoted 9 lines · On 二, 2013-08-13 at 10:07 +0800, [email protected] wrote:
From: Lan Tianyu <[email protected]>
acpi_processor_get_limit_info()is only called in the__acpi_processor_start()and what it does actually is just to checkpr->flags.throttlingand set limit. The pr pointer has been checked in the__acpi_processor_start()beforeacpi_processor_get_limit_info()being called. It doesn't make sense still to keep it as a function. So move code to__acpi_processor_start()and removeacpi_processor_get_limit_info().
Quoted 3 lines
Quoted 1 line
Signed-off-by Lan Tianyu <[email protected]>Acked-by Zhang Rui <[email protected]>
Queued up for 3.12.
Thanks,
Rafael
Quoted 45 lines
Quoted 43 lines
--- drivers/acpi/processor_driver.c | 4 +++- drivers/acpi/processor_thermal.c | 12 ------------ 2 files changed, 3 insertions(+), 13 deletions(-)drivers/acpi/processor_driver.c +3
-1@@ -175,7 +175,9 @@ static int __acpi_processor_start(struct acpi_device *device)acpi_processor_load_module (pr);#endif acpi_processor_get_throttling_info (pr); -acpi_processor_get_limit_info (pr); + +if (pr->flags.throttling) + pr->flags.limit =1 ;if (!cpuidle_get_driver () ||cpuidle_get_driver () == &acpi_idle_driver)acpi_processor_power_init (pr);drivers/acpi/processor_thermal.c +0
-12@@ -186,18 +186,6 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)#endif -int acpi_processor_get_limit_info (struct acpi_processor *pr) -{ - -if (!pr) -return -EINVAL ; - -if (pr->flags.throttling) - pr->flags.limit =1 ; - -return 0 ; -} -/* thermal coolign device callbacks */ static int acpi_processor_max_state (struct acpi_processor *pr) {
Signature · 6 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html