From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756944AbbGTVXN (ORCPT ); Mon, 20 Jul 2015 17:23:13 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:59800 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754048AbbGTVXL convert rfc822-to-8bit (ORCPT ); Mon, 20 Jul 2015 17:23:11 -0400 From: "Rafael J. Wysocki" To: Pan Xinhui Cc: Linux PM list , ACPI Devel Maling List , Linux Kernel Mailing List , Viresh Kumar , "yanmin_zhang@linux.intel.com" Subject: Re: [PATCH 1/2] ACPI / processor: Drop an unused argument of a cleanup routine Date: Mon, 20 Jul 2015 23:49:56 +0200 Message-ID: <2302038.j7LN5nT5iO@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.1.0-rc5+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <55AC52BA.8070205@intel.com> References: <10273534.kyzK8rhvUz@vostro.rjw.lan> <15976638.8lfDjd5ol2@vostro.rjw.lan> <55AC52BA.8070205@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 20, 2015 09:45:30 AM Pan Xinhui wrote: > hi, Rafael > thanks for your nice work :) > On 2015年07月18日 09:14, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > 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 > > --- > > 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. Possible build errors should be sorted out by the 0-day testing and the functional part will be OK if the name of the remaining argument is not changed in any spot. > > 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(); You're right, thanks! I'll send an update shortly. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.