From: Joe Perches <joe@perches.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next-2.6] net: use __packed annotation (fwd)
Date: Wed, 02 Jun 2010 19:26:57 -0700 [thread overview]
Message-ID: <1275532017.23599.127.camel@Joe-Laptop.home> (raw)
In-Reply-To: <20100603021542.585D42436B@mail.perches.com>
Some comments:
[]
> diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h
> index 5ec9ca6..8da05bc 100644
> --- a/include/linux/ncp_fs_sb.h
> +++ b/include/linux/ncp_fs_sb.h
> @@ -104,13 +104,13 @@ struct ncp_server {
>
> unsigned int state; /* STREAM only: receiver state */
> struct {
> - __u32 magic __attribute__((packed));
> - __u32 len __attribute__((packed));
> - __u16 type __attribute__((packed));
> - __u16 p1 __attribute__((packed));
> - __u16 p2 __attribute__((packed));
> - __u16 p3 __attribute__((packed));
> - __u16 type2 __attribute__((packed));
> + __u32 magic __packed;
> + __u32 len __packed;
> + __u16 type __packed;
> + __u16 p1 __packed;
> + __u16 p2 __packed;
> + __u16 p3 __packed;
> + __u16 type2 __packed;
> } buf; /* STREAM only: temporary buffer */
This could probably just be
struct {
__u32 magic;
__u32 len;
__u16 type;
__u16 p1;
__u16 p2;
__u16 p3;
__u16 type2;
} __packed buf; /* STREAM only: temporary buffer */
[]
> diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
> index f28ad2c..499c045 100644
> --- a/net/iucv/iucv.c
> +++ b/net/iucv/iucv.c
> @@ -1463,7 +1463,7 @@ struct iucv_path_pending {
> u32 res3;
> u8 ippollfg;
> u8 res4[3];
> -} __attribute__ ((packed));
> +} __packed;
iucv also has some structs that are __attribute__ ((packed,aligned(8)));
Perhaps those should become: __packed __aligned(8) instead of
leaving them as is.
parent reply other threads:[~2010-06-03 2:26 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20100603021542.585D42436B@mail.perches.com>]
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=1275532017.23599.127.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox