Skip to content

Commit

Permalink
[PATCH] Fix sparse parse error in lppaca.h
Browse files Browse the repository at this point in the history
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>
[ Side note: fixing sparse wouldn't be hard, but the "attribute at the
  end" version is the canonical one, and the one that makes sense. So
  let's just fix the kernel instead. Luc Van Oostenryck already sent
  out a sparse patch to the sparse mailing list in case anybody cares.
               -- Linus ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Bryan O'Sullivan authored and Linus Torvalds committed Jan 18, 2006
1 parent 2664b25 commit c6b3fea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-powerpc/lppaca.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -129,7 +129,7 @@ struct __attribute__((__aligned__(0x400))) lppaca {
// 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[];

Expand Down

0 comments on commit c6b3fea

Please sign in to comment.