* [PATCH] ACPI: processor_throttling: remove variable count
@ 2022-10-24 13:32 Colin Ian King
2022-10-28 17:03 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-10-24 13:32 UTC (permalink / raw)
To: Rafael J . Wysocki, Len Brown, linux-acpi; +Cc: kernel-janitors, linux-kernel
Variable count is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/acpi/processor_throttling.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index a822fe410dda..00d045e5f524 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -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)
--
2.37.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ACPI: processor_throttling: remove variable count
2022-10-24 13:32 [PATCH] ACPI: processor_throttling: remove variable count Colin Ian King
@ 2022-10-28 17:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-10-28 17:03 UTC (permalink / raw)
To: Colin Ian King
Cc: Rafael J . Wysocki, Len Brown, linux-acpi, kernel-janitors, linux-kernel
On Mon, Oct 24, 2022 at 3:33 PM Colin Ian King <colin.i.king@gmail.com> wrote:
>
> Variable count is just being incremented and it's never used
> anywhere else. The variable and the increment are redundant so
> remove it.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> drivers/acpi/processor_throttling.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
> index a822fe410dda..00d045e5f524 100644
> --- a/drivers/acpi/processor_throttling.c
> +++ b/drivers/acpi/processor_throttling.c
> @@ -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)
> --
Applied as 6.2 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-28 17:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 13:32 [PATCH] ACPI: processor_throttling: remove variable count Colin Ian King
2022-10-28 17:03 ` Rafael J. Wysocki
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).