public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Christoph Lameter <cl@linux-foundation•org>
Cc: linux-next@vger•kernel.org, Rusty Russell <rusty@rustcorp•com.au>,
	Andrew Morton <akpm@linux-foundation•org>
Subject: linux-next: tree build warning
Date: Tue, 28 Oct 2008 18:13:40 +1100	[thread overview]
Message-ID: <20081028181340.daec73cb.sfr@canb.auug.org.au> (raw)

Hi Christoph,

Today's linux-next build (powerpc ppc44x_config) produced many warnings like
this:

In file included from include/linux/rcupdate.h:39,
                 from include/linux/sem.h:81,
                 from include/linux/sched.h:69,
                 from arch/powerpc/include/asm/elf.h:5,
                 from include/linux/elf.h:7,
                 from include/linux/module.h:14,
                 from drivers/mtd/chips/chipreg.c:7:
include/linux/percpu.h:177:1: warning: "per_cpu_offset" redefined
include/asm-generic/percpu.h:81:1: warning: this is the location of the previous definition

Probably caused by commit 66f2d2c531e755656a5481fb92a9d137404d9f44
("cpualloc: the allocator") from the cpu_alloc tree which adds the
definition to linux/percpu.h in the non-CONFIG_SMP case.

I applied the following patch (which may not be correct but made the
warnings go away).
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <sfr@canb•auug.org.au>
Date: Tue, 28 Oct 2008 17:56:26 +1100
Subject: [PATCH] cpu_alloc: per_cpu_offset is already defined for !CONFIG_SMP

in asm-generic/percpu.h which is included by asm/percpu.h on all
architectures except alpha.

Signed-off-by: Stephen Rothwell <sfr@canb•auug.org.au>
---
 arch/alpha/include/asm/percpu.h |    1 +
 include/linux/percpu.h          |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percpu.h
index 3495e8e..4d0f7f3 100644
--- a/arch/alpha/include/asm/percpu.h
+++ b/arch/alpha/include/asm/percpu.h
@@ -68,6 +68,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
 #define per_cpu(var, cpu)		(*((void)(cpu), &per_cpu_var(var)))
 #define __get_cpu_var(var)		per_cpu_var(var)
 #define __raw_get_cpu_var(var)		per_cpu_var(var)
+#define per_cpu_offset(x) 0
 
 #define PER_CPU_ATTRIBUTES
 
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index dd6693f..2eab4d5 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -174,7 +174,6 @@ static inline void cpu_free(void *cpu_pointer, unsigned long size)
 }
 
 #define SHIFT_PERCPU_PTR(__p, __offset)	(__p)
-#define per_cpu_offset(x) 0
 #endif
 
 /* Return a pointer to the instance of a object for a particular processor */
-- 
1.5.6.5

             reply	other threads:[~2008-10-28  7:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28  7:13 Stephen Rothwell [this message]
2008-10-30 18:05 ` linux-next: tree build warning Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2008-12-03 23:33 Stephen Rothwell
2008-12-15 13:35 Stephen Rothwell
2008-12-15 13:56 ` Thomas Gleixner
2009-03-12  5:48 Stephen Rothwell
2009-03-12  6:37 ` Nick Piggin
2009-03-12  6:42   ` Stephen Rothwell
2009-03-16  8:14 Stephen Rothwell
2009-03-20  0:22 ` Neil Brown
2009-03-31  5:22 Stephen Rothwell
2009-04-23  6:17 Stephen Rothwell
2009-04-23  6:43 ` Ingo Molnar

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=20081028181340.daec73cb.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=cl@linux-foundation$(echo .)org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=rusty@rustcorp$(echo .)com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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