public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] Clean up alloc_percpu: change percpu_ptr to per_cpu_ptr
@ 2008-11-18  5:47 Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2008-11-18  5:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, mingo, lenb, cpufreq


There are two allocated per-cpu accessor macros with almost identical
spelling.  The original and far more popular is per_cpu_ptr, so change
over the other four files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: mingo@redhat.com
Cc: lenb@kernel.org
Cc: cpufreq@vger.kernel.org
---
 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c |    2 +-
 drivers/acpi/processor_perflib.c           |    4 ++--
 kernel/sched.c                             |    6 +++---
 kernel/stop_machine.c                      |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff -r 4a008e8d6ea4 arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
--- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c	Mon Nov 17 21:32:09 2008 +1030
+++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c	Mon Nov 17 21:33:07 2008 +1030
@@ -581,7 +581,7 @@
 	if (!data)
 		return -ENOMEM;
 
-	data->acpi_data = percpu_ptr(acpi_perf_data, cpu);
+	data->acpi_data = per_cpu_ptr(acpi_perf_data, cpu);
 	per_cpu(drv_data, cpu) = data;
 
 	if (cpu_has(c, X86_FEATURE_CONSTANT_TSC))
diff -r 4a008e8d6ea4 drivers/acpi/processor_perflib.c
--- a/drivers/acpi/processor_perflib.c	Mon Nov 17 21:32:09 2008 +1030
+++ b/drivers/acpi/processor_perflib.c	Mon Nov 17 21:33:07 2008 +1030
@@ -611,12 +611,12 @@
 			continue;
 		}
 
-		if (!performance || !percpu_ptr(performance, i)) {
+		if (!performance || !per_cpu_ptr(performance, i)) {
 			retval = -EINVAL;
 			continue;
 		}
 
-		pr->performance = percpu_ptr(performance, i);
+		pr->performance = per_cpu_ptr(performance, i);
 		cpu_set(i, pr->performance->shared_cpu_map);
 		if (acpi_processor_get_psd(pr)) {
 			retval = -EINVAL;
diff -r 4a008e8d6ea4 kernel/sched.c
--- a/kernel/sched.c	Mon Nov 17 21:32:09 2008 +1030
+++ b/kernel/sched.c	Mon Nov 17 21:33:07 2008 +1030
@@ -9306,7 +9306,7 @@
 	int i;
 
 	for_each_possible_cpu(i) {
-		u64 *cpuusage = percpu_ptr(ca->cpuusage, i);
+		u64 *cpuusage = per_cpu_ptr(ca->cpuusage, i);
 
 		/*
 		 * Take rq->lock to make 64-bit addition safe on 32-bit
@@ -9333,7 +9333,7 @@
 	}
 
 	for_each_possible_cpu(i) {
-		u64 *cpuusage = percpu_ptr(ca->cpuusage, i);
+		u64 *cpuusage = per_cpu_ptr(ca->cpuusage, i);
 
 		spin_lock_irq(&cpu_rq(i)->lock);
 		*cpuusage = 0;
@@ -9370,7 +9370,7 @@
 
 	ca = task_ca(tsk);
 	if (ca) {
-		u64 *cpuusage = percpu_ptr(ca->cpuusage, task_cpu(tsk));
+		u64 *cpuusage = per_cpu_ptr(ca->cpuusage, task_cpu(tsk));
 
 		*cpuusage += cputime;
 	}
diff -r 4a008e8d6ea4 kernel/stop_machine.c
--- a/kernel/stop_machine.c	Mon Nov 17 21:32:09 2008 +1030
+++ b/kernel/stop_machine.c	Mon Nov 17 21:33:07 2008 +1030
@@ -130,7 +130,7 @@
 	 * doesn't hit this CPU until we're ready. */
 	get_cpu();
 	for_each_online_cpu(i) {
-		sm_work = percpu_ptr(stop_machine_work, i);
+		sm_work = per_cpu_ptr(stop_machine_work, i);
 		INIT_WORK(sm_work, stop_cpu);
 		queue_work_on(i, stop_machine_wq, sm_work);
 	}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-17 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-18  5:47 [PATCH 3/3] Clean up alloc_percpu: change percpu_ptr to per_cpu_ptr Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox