[PATCH][2.6.12-rc2] __attribute__ placement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

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 affect.

Thanks
Vinay 

 asm-m68knommu/MC68328.h   |    2 +-
 asm-m68knommu/MC68EZ328.h |    2 +-
 asm-m68knommu/MC68VZ328.h |    2 +-
 math-emu/double.h         |    4 ++--
 math-emu/extended.h       |    2 +-
 math-emu/quad.h           |    2 +-
 math-emu/single.h         |    2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
===========================================================================
diff -urN linux-2.6.12-rc2/include/asm-m68knommu/MC68328.h linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68328.h
--- linux-2.6.12-rc2/include/asm-m68knommu/MC68328.h	2005-04-07 18:55:40.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68328.h	2005-04-18 20:02:00.325855096 +0530
@@ -993,7 +993,7 @@
   volatile unsigned short int pad1;
   volatile unsigned short int pad2;
   volatile unsigned short int pad3;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
 
 
 /**********
diff -urN linux-2.6.12-rc2/include/asm-m68knommu/MC68EZ328.h linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68EZ328.h
--- linux-2.6.12-rc2/include/asm-m68knommu/MC68EZ328.h	2005-04-07 18:55:40.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68EZ328.h	2005-04-18 20:03:08.034561808 +0530
@@ -815,7 +815,7 @@
   volatile unsigned short int nipr;
   volatile unsigned short int pad1;
   volatile unsigned short int pad2;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
 
 
 /**********
diff -urN linux-2.6.12-rc2/include/asm-m68knommu/MC68VZ328.h linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68VZ328.h
--- linux-2.6.12-rc2/include/asm-m68knommu/MC68VZ328.h	2005-04-07 18:55:40.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/asm-m68knommu/MC68VZ328.h	2005-04-18 20:02:28.186619616 +0530
@@ -909,7 +909,7 @@
   volatile unsigned short int nipr;
   volatile unsigned short int hmark;
   volatile unsigned short int unused;
-} m68328_uart __attribute__((packed));
+} __attribute__((packed)) m68328_uart;
 
 
 
diff -urN linux-2.6.12-rc2/include/math-emu/double.h linux-2.6.12-rc2-nvk/include/math-emu/double.h
--- linux-2.6.12-rc2/include/math-emu/double.h	2005-04-07 18:55:41.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/math-emu/double.h	2005-04-18 20:04:55.998148848 +0530
@@ -67,7 +67,7 @@
     unsigned exp   : _FP_EXPBITS_D;
     unsigned sign  : 1;
 #endif
-  } bits __attribute__((packed));
+  } __attribute__((packed)) bits;
 };
 
 #define FP_DECL_D(X)		_FP_DECL(2,X)
@@ -139,7 +139,7 @@
     unsigned exp  : _FP_EXPBITS_D;
     unsigned sign : 1;
 #endif
-  } bits __attribute__((packed));
+  } __attribute__((packed)) bits;
 };
 
 #define FP_DECL_D(X)		_FP_DECL(1,X)
diff -urN linux-2.6.12-rc2/include/math-emu/extended.h linux-2.6.12-rc2-nvk/include/math-emu/extended.h
--- linux-2.6.12-rc2/include/math-emu/extended.h	2005-04-07 18:55:41.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/math-emu/extended.h	2005-04-18 20:04:14.768416720 +0530
@@ -68,7 +68,7 @@
       unsigned exp : _FP_EXPBITS_E;
       unsigned sign : 1;
 #endif /* not bigendian */
-   } bits __attribute__((packed));
+   } __attribute__((packed)) bits;
 };
 
 
diff -urN linux-2.6.12-rc2/include/math-emu/quad.h linux-2.6.12-rc2-nvk/include/math-emu/quad.h
--- linux-2.6.12-rc2/include/math-emu/quad.h	2005-04-07 18:55:41.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/math-emu/quad.h	2005-04-18 20:03:55.135401392 +0530
@@ -72,7 +72,7 @@
       unsigned exp : _FP_EXPBITS_Q;
       unsigned sign : 1;
 #endif /* not bigendian */
-   } bits __attribute__((packed));
+   } __attribute__((packed)) bits;
 };
 
 
diff -urN linux-2.6.12-rc2/include/math-emu/single.h linux-2.6.12-rc2-nvk/include/math-emu/single.h
--- linux-2.6.12-rc2/include/math-emu/single.h	2005-04-07 18:55:41.000000000 +0530
+++ linux-2.6.12-rc2-nvk/include/math-emu/single.h	2005-04-18 20:05:20.208468320 +0530
@@ -56,7 +56,7 @@
     unsigned exp  : _FP_EXPBITS_S;
     unsigned sign : 1;
 #endif
-  } bits __attribute__((packed));
+  } __attribute__((packed)) bits;
 };
 
 #define FP_DECL_S(X)		_FP_DECL(1,X)

===========================================================================


-- 
Views expressed in this mail are those of the individual sender and 
do not bind Gsec1 Limited. or its subsidiary, unless the sender has done
so expressly with due authority of Gsec1.
_________________________________________________________________________


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux