On Wednesday 30 August 2006 00:51, Daniel Drake wrote:
> From: Ulrich Kunitz <[EMAIL PROTECTED]>
> 
> Inspired by an e-mail by Stephen Hemminger I decided to remove all
> unneeded packed attributes from the code where the member variables are
> already aligned. This avoids horrible code being generated on some
> architectures.
> 
> Signed-off-by: Ulrich Kunitz <[EMAIL PROTECTED]>
> Signed-off-by: Daniel Drake <[EMAIL PROTECTED]>
> ---
>  zd_ieee80211.h |    2 +-
>  zd_mac.c       |    2 +-
>  zd_mac.h       |    4 ++--
>  zd_usb.h       |   14 +++++++-------
>  4 files changed, 11 insertions(+), 11 deletions(-)
> 
> Index: linux-2.6/drivers/net/wireless/zd1211rw/zd_ieee80211.h
> ===================================================================
> --- linux-2.6.orig/drivers/net/wireless/zd1211rw/zd_ieee80211.h
> +++ linux-2.6/drivers/net/wireless/zd1211rw/zd_ieee80211.h
> @@ -64,7 +64,7 @@ struct cck_plcp_header {
>       u8 service;
>       __le16 length;
>       __le16 crc16;
> -} __attribute__((packed));
> +};

Because this clearly is a workaround for broken compilers to me,
I would rather do the following:

--- linux-2.6.orig/drivers/net/wireless/zd1211rw/zd_ieee80211.h
+++ linux-2.6/drivers/net/wireless/zd1211rw/zd_ieee80211.h
@@ -64,7 +64,7 @@ struct cck_plcp_header {
        u8 service;
        __le16 length;
        __le16 crc16;
-} __attribute__((packed));
+} /* __attribute__((packed)) */;


This way it's still clear to the reader, that these structs
must be packed and are most likely for communication with
the hardware.

-- 
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to