All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Daniel Drake <dsd@gentoo.org>
Cc: linville@tuxdriver.com, netdev@vger.kernel.org, kune@deine-taler.de
Subject: Re: [PATCH] zd1211rw: Removed unneeded packed attributes
Date: Wed, 30 Aug 2006 15:06:03 +0200	[thread overview]
Message-ID: <200608301506.03296.mb@bu3sch.de> (raw)
In-Reply-To: <20060829225143.AD4637B40A0@zog.reactivated.net>

On Wednesday 30 August 2006 00:51, Daniel Drake wrote:
> From: Ulrich Kunitz <kune@deine-taler.de>
> 
> 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 <kune@deine-taler.de>
> Signed-off-by: Daniel Drake <dsd@gentoo.org>
> ---
>  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.

  reply	other threads:[~2006-08-30 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 22:51 [PATCH] zd1211rw: Removed unneeded packed attributes Daniel Drake
2006-08-30 13:06 ` Michael Buesch [this message]
2006-09-01 19:41   ` Ulrich Kunitz

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=200608301506.03296.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=dsd@gentoo.org \
    --cc=kune@deine-taler.de \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.