Re: [PATCH 1/2] ACPI / processor: Drop an unused argument of a cleanup routine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi, Rafael
	thanks for your nice work :)
On 2015年07月18日 09:14, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> 
> acpi_processor_unregister_performance() actually doesn't use its
> first argument, so drop it and update the callers accordingly.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> ---
>  drivers/acpi/processor_perflib.c    |    4 +---
>  drivers/cpufreq/acpi-cpufreq.c      |    5 ++---
>  drivers/cpufreq/e_powersaver.c      |    2 +-
>  drivers/cpufreq/ia64-acpi-cpufreq.c |    5 ++---
>  drivers/cpufreq/powernow-k7.c       |    4 ++--
>  drivers/cpufreq/powernow-k8.c       |    5 ++---
>  drivers/xen/xen-acpi-processor.c    |    4 ++--
>  include/acpi/processor.h            |    5 +----
>  8 files changed, 13 insertions(+), 21 deletions(-)
> 

I wish I can test this patch. However I only have x86 hardware, not all codes can be tested on my side.

> Index: linux-pm/drivers/xen/xen-acpi-processor.c
> ===================================================================
> --- linux-pm.orig/drivers/xen/xen-acpi-processor.c
> +++ linux-pm/drivers/xen/xen-acpi-processor.c
> @@ -563,7 +563,7 @@ err_unregister:
>  	for_each_possible_cpu(i) {
>  		struct acpi_processor_performance *perf;
>  		perf = per_cpu_ptr(acpi_perf_data, i);
> -		acpi_processor_unregister_performance(perf, i);
> +		acpi_processor_unregister_performance(i);
>  	}
>  err_out:
>  	/* Freeing a NULL pointer is OK: alloc_percpu zeroes. */
> @@ -582,7 +582,7 @@ static void __exit xen_acpi_processor_ex
>  	for_each_possible_cpu(i) {
>  		struct acpi_processor_performance *perf;
>  		perf = per_cpu_ptr(acpi_perf_data, i);
> -		acpi_processor_unregister_performance(perf, i);
> +		acpi_processor_unregister_performance(i);


>  	}
>  	free_acpi_perf_data();
>  }
> 

After a simple review, in functions above *perf* is not used anymore, can we just change the codes like below
	@@ -580,9 +580,7 @@ static void __exit xen_acpi_processor_exit(void)
        kfree(acpi_id_present);
        kfree(acpi_id_cst_present);
        for_each_possible_cpu(i) {
-               struct acpi_processor_performance *perf;
-               perf = per_cpu_ptr(acpi_perf_data, i);
-               acpi_processor_unregister_performance(perf, i);
+               acpi_processor_unregister_performance(i);
        }
        free_acpi_perf_data();

thanks
xinhui
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux