From: Pan Xinhui <xinhuix.pan@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM list <linux-pm@vger.kernel.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
"yanmin_zhang@linux.intel.com" <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 09:45:30 +0800 [thread overview]
Message-ID: <55AC52BA.8070205@intel.com> (raw)
In-Reply-To: <15976638.8lfDjd5ol2@vostro.rjw.lan>
hi, Rafael
thanks for your nice work :)
On 2015年07月18日 09:14, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.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@intel.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-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-07-20 1:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 1:13 [PATCH 0/2] ACPI / cpufreq: ACPI processor driver and ACPI cpufreq driver cleanups Rafael J. Wysocki
2015-07-18 1:14 ` [PATCH 1/2] ACPI / processor: Drop an unused argument of a cleanup routine Rafael J. Wysocki
2015-07-20 1:45 ` Pan Xinhui [this message]
2015-07-20 21:49 ` Rafael J. Wysocki
2015-07-18 1:16 ` [PATCH 2/2] cpufreq: acpi-cpufreq: Drop acpi_data from struct acpi_cpufreq_data Rafael J. Wysocki
2015-07-18 6:04 ` [PATCH 0/2] ACPI / cpufreq: ACPI processor driver and ACPI cpufreq driver cleanups Viresh Kumar
2015-07-20 22:40 ` Rafael J. Wysocki
2015-07-20 22:12 ` [PATCH v2 0/3] " Rafael J. Wysocki
2015-07-20 22:13 ` [PATCH v2 1/3] cpufreq: acpi-cpufreq: Fix up the handling of the cpb sysfs attribute Rafael J. Wysocki
2015-07-20 22:14 ` [PATCH v2 2/3] ACPI / processor: Drop an unused argument of a cleanup routine Rafael J. Wysocki
2015-07-20 22:15 ` [PATCH v2 3/3] cpufreq: acpi-cpufreq: Drop acpi_data from struct acpi_cpufreq_data Rafael J. Wysocki
2015-07-21 2:33 ` [PATCH v2 0/3] ACPI / cpufreq: ACPI processor driver and ACPI cpufreq driver cleanups Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55AC52BA.8070205@intel.com \
--to=xinhuix.pan@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=viresh.kumar@linaro.org \
--cc=yanmin_zhang@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).