public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Changli Gao <xiaosuo@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net: define __packed for the userspace code
Date: Sun, 22 Aug 2010 15:07:41 +0200	[thread overview]
Message-ID: <201008221507.42023.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTin1BOgHBc4sTwFAmQhKFNvZ+90herc4Dsh9P8y2@mail.gmail.com>

On Sunday 22 August 2010 13:23:42 Changli Gao wrote:
> On Sun, Aug 22, 2010 at 7:12 PM, Changli Gao <xiaosuo@gmail.com> wrote:
> > This commit
> >
> >  commit bc10502dba37d3b210efd9f3867212298f13b78e
> >  Author: Eric Dumazet <eric.dumazet@gmail.com>
> >  Date:   Thu Jun 3 03:21:52 2010 -0700
> >
> >    net: use __packed annotation
> >
> > makes use of __packed in the userspace code. So we'd better define __packed
> > for the userspace code too.
> >
> 
> Oh, sorry. This patch can't work as include/linux/compiler.h isn't
> exported to the userspace. But where should we define __packed for the
> userspace code? include/linux/types.h?

I would try to avoid making those structures packed to start with.
>From what I can see, they structures annotated in the above commit
mostly don't even require explicit packing because they are already
packed. Not marking them packed makes the code portable to non-gcc
compilers.

	Arnd

  reply	other threads:[~2010-08-22 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 11:12 [PATCH] net: define __packed for the userspace code Changli Gao
2010-08-22 11:23 ` Changli Gao
2010-08-22 13:07   ` Arnd Bergmann [this message]
2010-08-22 13:47     ` Changli Gao
2010-08-23  1:36       ` David Miller
2010-08-23  2:29         ` Changli Gao
2010-08-23  2:36           ` David Miller
2010-08-23  4:16             ` David Miller

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=201008221507.42023.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /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