public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] build break in include/asm-x86_64/atomic.h
Date: Tue, 18 Oct 2005 11:03:24 -0500	[thread overview]
Message-ID: <20051018160323.GA10863@us.ibm.com> (raw)

While building the latest -mm kernel on x86-64, I hit a build break (see
below).

....
  CC [M]  fs/ntfs/namei.o
In file included from include/linux/dcache.h:6,
                 from fs/ntfs/namei.c:23:
include/asm/atomic.h:383: error: parse error before '*' token
include/asm/atomic.h:384: warning: function declaration isn't a 
prototype
include/asm/atomic.h: In function `atomic_scrub':
include/asm/atomic.h:385: error: `u32' undeclared (first use in this 
function)
include/asm/atomic.h:385: error: (Each undeclared identifier is reported 
only once
include/asm/atomic.h:385: error: for each function it appears in.)
include/asm/atomic.h:385: error: parse error before "i"
include/asm/atomic.h:386: error: `i' undeclared (first use in this 
function)
include/asm/atomic.h:386: error: `size' undeclared (first use in this 
function)
include/asm/atomic.h:386: error: `virt_addr' undeclared (first use in 
this function)
include/asm/atomic.h:386: warning: left-hand operand of comma expression 
has no effect
make[2]: *** [fs/ntfs/namei.o] Error 1
make[1]: *** [fs/ntfs] Error 2
make: *** [fs] Error 2

The problem is the atomic_scrub function is attempting to use 'u32', 
which is not defined at this point.  If the 'u32's are defined (by 
including <asm/types.h>) or changed to 'unsigned int', there is no 
problem (and the kernel compiles, boots, and runs perfectly).

Below is a patch which changes the 'u32' to 'unsigned int'.  

Signed-off-by: Jon Mason <jdmason@us.ibm.com>

--- linux-2.6.14-rc4-mm1/include/asm-x86_64/atomic.h.orig	2005-10-18 08:42:38.000000000 -0500
+++ linux-2.6.14-rc4-mm1/include/asm-x86_64/atomic.h	2005-10-18 08:24:20.000000000 -0500
@@ -380,9 +380,9 @@ __asm__ __volatile__(LOCK "orl %0,%1" \
 
 /* ECC atomic, DMA, SMP and interrupt safe scrub function */
 
-static __inline__ void atomic_scrub(u32 *virt_addr, u32 size)
+static __inline__ void atomic_scrub(unsigned int *virt_addr, unsigned int size)
 {
-	u32 i;
+	unsigned int i;
 	for (i = 0; i < size / 4; i++, virt_addr++)
 		/* Very carefully read and write to memory atomically
 		 * so we are interrupt, DMA and SMP safe.

                 reply	other threads:[~2005-10-18 16:03 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=20051018160323.GA10863@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=akpm@osdl.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