Skip to content

Commit

Permalink
[PATCH] __attribute__ placement fixes
Browse files Browse the repository at this point in the history
The variable attributes "packed" and "align" when used with struct, should
have the following order:

struct ... {...} __attribute__((packed)) var;

This patch fixes few instances where the variable and attributes are placed
the other way around and had no effect.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Vinay K Nallamothu authored and Linus Torvalds committed May 1, 2005
1 parent e49332b commit f78fc87
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/gt96100eth.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ typedef struct {
u32 cmdstat;
u32 next;
u32 buff_ptr;
} gt96100_td_t __attribute__ ((packed));
} __attribute__ ((packed)) gt96100_td_t;

typedef struct {
#ifdef DESC_BE
Expand All @@ -227,7 +227,7 @@ typedef struct {
u32 cmdstat;
u32 next;
u32 buff_ptr;
} gt96100_rd_t __attribute__ ((packed));
} __attribute__ ((packed)) gt96100_rd_t;


/* Values for the Tx command-status descriptor entry. */
Expand Down
2 changes: 1 addition & 1 deletion include/asm-m68knommu/MC68328.h
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ typedef volatile struct {
volatile unsigned short int pad1;
volatile unsigned short int pad2;
volatile unsigned short int pad3;
} m68328_uart __attribute__((packed));
} __attribute__((packed)) m68328_uart;


/**********
Expand Down
2 changes: 1 addition & 1 deletion include/asm-m68knommu/MC68EZ328.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ typedef volatile struct {
volatile unsigned short int nipr;
volatile unsigned short int pad1;
volatile unsigned short int pad2;
} m68328_uart __attribute__((packed));
} __attribute__((packed)) m68328_uart;


/**********
Expand Down
2 changes: 1 addition & 1 deletion include/asm-m68knommu/MC68VZ328.h
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ typedef struct {
volatile unsigned short int nipr;
volatile unsigned short int hmark;
volatile unsigned short int unused;
} m68328_uart __attribute__((packed));
} __attribute__((packed)) m68328_uart;



Expand Down

0 comments on commit f78fc87

Please sign in to comment.