lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55AC52BA.8070205@intel.com>
Date:	Mon, 20 Jul 2015 09:45:30 +0800
From:	Pan Xinhui <xinhuix.pan@...el.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Linux PM list <linux-pm@...r.kernel.org>
CC:	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	"yanmin_zhang@...ux.intel.com" <yanmin_zhang@...ux.intel.com>
Subject: Re: [PATCH 1/2] ACPI / processor: Drop an unused argument of a cleanup
 routine

hi, Rafael
	thanks for your nice work :)
On 2015年07月18日 09:14, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> 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@...el.com>
> ---
>  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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ