public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org
Cc: mingo@redhat.com
Cc: lenb@kernel.org
Cc: cpufreq@vger.kernel.org
Subject: [PATCH 3/3] Clean up alloc_percpu: change percpu_ptr to per_cpu_ptr
Date: Mon Nov 17 23:47:44 CST 2008	[thread overview]
Message-ID: <20081117132509.AB4B3DDDF5@ozlabs.org> (raw)


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);
 	}


                 reply	other threads:[~2008-11-17 13:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20081117132509.AB4B3DDDF5@ozlabs.org \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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