From: Vinay K Nallamothu <vinay.nallamothu@gsecone.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH][2.6.12-rc2] __attribute__ placement
Date: Mon, 18 Apr 2005 20:46:44 +0530 [thread overview]
Message-ID: <1113837404.4217.15.camel@vinay.gsecone.com> (raw)
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.
_________________________________________________________________________
next reply other threads:[~2005-04-18 15:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-18 15:16 Vinay K Nallamothu [this message]
[not found] ` <1113994849.10792.46.camel@vinay.gsecone.com>
2005-04-20 11:24 ` Vinay K Nallamothu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1113837404.4217.15.camel@vinay.gsecone.com \
--to=vinay.nallamothu@gsecone.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®