Centralize the attribute macro definition of "__packed" so no
subsystem has to do that explicitly.

Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]>

---

  compile tested to make sure the HFS subsystem still builds.  now
there's just 50 gazillion usages of "__attribute__((packed))" that can
be tightened up.


 fs/hfs/hfs.h                 |    2 --
 fs/hfsplus/hfsplus_raw.h     |    2 --
 include/linux/compiler-gcc.h |    1 +
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h
index 88099ab..1445e3a 100644
--- a/fs/hfs/hfs.h
+++ b/fs/hfs/hfs.h
@@ -83,8 +83,6 @@

 /*======== HFS structures as they appear on the disk ========*/

-#define __packed __attribute__ ((packed))
-
 /* Pascal-style string of up to 31 characters */
 struct hfs_name {
        u8 len;
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h
index 4920553..fe99fe8 100644
--- a/fs/hfsplus/hfsplus_raw.h
+++ b/fs/hfsplus/hfsplus_raw.h
@@ -15,8 +15,6 @@

 #include <linux/types.h>

-#define __packed __attribute__ ((packed))
-
 /* Some constants */
 #define HFSPLUS_SECTOR_SIZE        512
 #define HFSPLUS_SECTOR_SHIFT         9
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 6e1c44a..b6e39f5 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -27,6 +27,7 @@
 #define __inline__     __inline__      __attribute__((always_inline))
 #define __inline       __inline        __attribute__((always_inline))
 #define __deprecated                   __attribute__((deprecated))
+#define __packed                       __attribute__((packed))
 #define  noinline                      __attribute__((noinline))
 #define __attribute_pure__             __attribute__((pure))
 #define __attribute_const__            __attribute__((__const__))

-
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/

Reply via email to