Skip to contentSkip to conversation

ACPI/Processor: Remove acpi_processor_get_limit_info()

PATCH In review [email protected] 3 participants 3 messages Aug 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index bd11ef9..e534ba6 100644
@@ -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
index e8e6527..d1d2e7f 100644
@@ -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
reviewer Acked-by on v1 1/1
#1 lore raw
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 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().

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
index bd11ef9..e534ba6 100644
@@ -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
index e8e6527..d1d2e7f 100644
@@ -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

#2 lore raw
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 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().

Quoted 3 lines
Quoted 1 line

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
index bd11ef9..e534ba6 100644
@@ -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
index e8e6527..d1d2e7f 100644
@@ -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