Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbbGTBsR (ORCPT ); Sun, 19 Jul 2015 21:48:17 -0400 Received: from mga14.intel.com ([192.55.52.115]:13904 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729AbbGTBsP (ORCPT ); Sun, 19 Jul 2015 21:48:15 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,505,1432623600"; d="scan'208";a="765683922" Message-ID: <55AC52BA.8070205@intel.com> Date: Mon, 20 Jul 2015 09:45:30 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Rafael J. Wysocki" , Linux PM list CC: 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 References: <10273534.kyzK8rhvUz@vostro.rjw.lan> <15976638.8lfDjd5ol2@vostro.rjw.lan> In-Reply-To: <15976638.8lfDjd5ol2@vostro.rjw.lan> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2636 Lines: 68 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. > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/