Skip to contentSkip to conversation

ACPI: processor_throttling: remove variable count

PATCH Applied Colin Ian King 2 participants 2 messages Oct 24, 2022 – Oct 28, 2022

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

PATCH 1/1 ACPI: processor_throttling: remove variable count

Variable count is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---
 drivers/acpi/processor_throttling.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/acpi/processor_throttling.c +1 -3
index a822fe410dda..00d045e5f524 100644
@@ -50,7 +50,7 @@ static int __acpi_processor_set_throttling(struct acpi_processor *pr,
 
 static int acpi_processor_update_tsd_coord(void)
 {
-	int count, count_target;
+	int count_target;
 	int retval = 0;
 	unsigned int i, j;
 	cpumask_var_t covered_cpus;
@@ -107,7 +107,6 @@ static int acpi_processor_update_tsd_coord(void)
 
 		/* Validate the Domain info */
 		count_target = pdomain->num_processors;
-		count = 1;
 
 		for_each_possible_cpu(j) {
 			if (i == j)
@@ -140,7 +139,6 @@ static int acpi_processor_update_tsd_coord(void)
 
 			cpumask_set_cpu(j, covered_cpus);
 			cpumask_set_cpu(j, pthrottling->shared_cpu_map);
-			count++;
 		}
 		for_each_possible_cpu(j) {
 			if (i == j)
Signature · 1 line
2.37.3
maintainer Applied
#1 lore raw
Quoted 32 lines · Colin Ian King

Variable count is just being incremented and it's never used anywhere else. The variable and the increment are redundant so remove it.

---
 drivers/acpi/processor_throttling.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/acpi/processor_throttling.c +1 -2
index a822fe410dda..00d045e5f524 100644
@@ -50,7 +50,7 @@ static int __acpi_processor_set_throttling(struct acpi_processor *pr,
 
 static int acpi_processor_update_tsd_coord(void)
 {
-       int count, count_target;
+       int count_target;
        int retval = 0;
        unsigned int i, j;
        cpumask_var_t covered_cpus;
@@ -107,7 +107,6 @@ static int acpi_processor_update_tsd_coord(void)
 
                /* Validate the Domain info */
                count_target = pdomain->num_processors;
-               count = 1;
 
                for_each_possible_cpu(j) {
                        if (i == j)

drivers/acpi/processor_throttling.c static int acpi_processor_update_tsd_coord(void)

Quoted 8 lines
drivers/acpi/processor_throttling.c +0 -2
@@ -140,7 +139,6 @@ static int acpi_processor_update_tsd_coord(void)
 
                        cpumask_set_cpu(j, covered_cpus);
                        cpumask_set_cpu(j, pthrottling->shared_cpu_map);
-                       count++;
                }
                for_each_possible_cpu(j) {
                        if (i == j)
--

Applied as 6.2 material, thanks!