public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: mmotm 2010-01-28-01-36 uploaded (sched.c + percpu)
Date: Fri, 29 Jan 2010 10:41:25 +1100	[thread overview]
Message-ID: <20100128234125.GH2996@kryten> (raw)
In-Reply-To: <4B61DD8F.6020507@oracle.com>

 
Hi Randy,

> when CONFIG_SMP is not enabled:
> 
> kernel/sched.c:10915: error: 'percpu_counter_batch' undeclared (first use in this function)

Did 1/2 make it into mmotm? 

Anton

---

[PATCH 1/2] percpu_counter: Make __percpu_counter_add an inline function on UP

Even though batch isn't used on UP, we may want to pass one in to keep the
SMP and UP code paths similar. Convert __percpu_counter_add to an inline
function so we wont get variable unused warnings if we do.
 
Signed-off-by: Anton Blanchard <anton@samba.org>
---

diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h
index a7684a5..794662b 100644
--- a/include/linux/percpu_counter.h
+++ b/include/linux/percpu_counter.h
@@ -98,9 +98,6 @@ static inline void percpu_counter_set(struct percpu_counter *fbc, s64 amount)
 	fbc->count = amount;
 }
 
-#define __percpu_counter_add(fbc, amount, batch) \
-	percpu_counter_add(fbc, amount)
-
 static inline void
 percpu_counter_add(struct percpu_counter *fbc, s64 amount)
 {
@@ -109,6 +106,12 @@ percpu_counter_add(struct percpu_counter *fbc, s64 amount)
 	preempt_enable();
 }
 
+static inline void
+__percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
+{
+	percpu_counter_add(fbc, amount);
+}
+
 static inline s64 percpu_counter_read(struct percpu_counter *fbc)
 {
 	return fbc->count;


  reply	other threads:[~2010-01-28 23:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  9:36 mmotm 2010-01-28-01-36 uploaded akpm
2010-01-28 18:53 ` mmotm 2010-01-28-01-36 uploaded (media/radio/saa7706h.c) Randy Dunlap
2010-01-28 18:55 ` mmotm 2010-01-28-01-36 uploaded (sched.c + percpu) Randy Dunlap
2010-01-28 23:41   ` Anton Blanchard [this message]
2010-01-29 17:35     ` Randy Dunlap
2010-01-28 20:48 ` mmotm 2010-01-28-01-36 uploaded (elfcore/compat_binfmt_elf) Randy Dunlap
2010-01-29  1:47   ` Daisuke HATAYAMA
2010-01-29  8:11     ` Daisuke HATAYAMA

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=20100128234125.GH2996@kryten \
    --to=anton@samba.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.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