Subject: Re: [PATCH] zd1211rw: Removed unneeded packed attributes

From: Michael Buesch <[email-masked]>
Date: Wed, 30 Aug 2006 15:06:03 +0200

On Wednesday 30 August 2006 00:51, Daniel Drake wrote:
> From: Ulrich Kunitz <[email-masked]>
> 
> 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-masked]>
> Signed-off-by: Daniel Drake <[email-masked]>
> ---
>  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.