linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix sparse parse error in lppaca.h
@ 2006-01-18  0:34 Bryan O'Sullivan
  2006-01-18  2:55 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan O'Sullivan @ 2006-01-18  0:34 UTC (permalink / raw)
  To: Andrew Morton, arnd, david; +Cc: linux-kernel

sparse can't parse a struct definition in include/asm-powerpc/lppaca.h,
even though gcc can accept it.  The form looks like this:

        struct __attribute__((whatever)) foo { };

An equivalent that both gcc and sparse can handle is

        struct foo { } __attribute__((whatever));

This is the only definition of this type in the tree, and fixing it is
easier than fixing sparse.

Signed-off-by: Bryan O'Sullivan <bos@serpentine.com>

diff -r 89be36ca2767 include/asm-powerpc/lppaca.h
--- a/include/asm-powerpc/lppaca.h	Wed Jan 18 04:00:05 2006 +0000
+++ b/include/asm-powerpc/lppaca.h	Tue Jan 17 16:27:27 2006 -0800
@@ -31,7 +31,7 @@
 
 /* The Hypervisor barfs if the lppaca crosses a page boundary.  A 1k
  * alignment is sufficient to prevent this */
-struct __attribute__((__aligned__(0x400))) lppaca {
+struct lppaca {
 //=============================================================================
 // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
 // NOTE: The xDynXyz fields are fields that will be dynamically changed by
@@ -129,7 +129,7 @@
 // CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
 //=============================================================================
 	u8	pmc_save_area[256];	// PMC interrupt Area           x00-xFF
-};
+} __attribute__((__aligned__(0x400)));
 
 extern struct lppaca lppaca[];
 




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix sparse parse error in lppaca.h
  2006-01-18  0:34 [PATCH] Fix sparse parse error in lppaca.h Bryan O'Sullivan
@ 2006-01-18  2:55 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2006-01-18  2:55 UTC (permalink / raw)
  To: Bryan O'Sullivan; +Cc: Andrew Morton, arnd, linux-kernel

On Tue, Jan 17, 2006 at 04:34:25PM -0800, Bryan O'Sullivan wrote:
> sparse can't parse a struct definition in include/asm-powerpc/lppaca.h,
> even though gcc can accept it.  The form looks like this:
> 
>         struct __attribute__((whatever)) foo { };
> 
> An equivalent that both gcc and sparse can handle is
> 
>         struct foo { } __attribute__((whatever));
> 
> This is the only definition of this type in the tree, and fixing it is
> easier than fixing sparse.
> 
> Signed-off-by: Bryan O'Sullivan <bos@serpentine.com>

Oops.

Acked-by: David Gibson <david@gibson.dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-18  2:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18  0:34 [PATCH] Fix sparse parse error in lppaca.h Bryan O'Sullivan
2006-01-18  2:55 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).