public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Adrian Bunk <bunk@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Pierre Ossman <drzeus@drzeus.cx>, Al Viro <viro@ftp.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>,
	linux-arch@vger.kernel.org, Jon Masters <jonathan@jonmasters.org>
Subject: Re: Correct types for mod_devicetable.h (was: Re: m68k build failure)
Date: Wed, 12 Dec 2007 12:34:34 +1100	[thread overview]
Message-ID: <200712121234.35471.rusty@rustcorp.com.au> (raw)
In-Reply-To: <20071208215811.GD20441@stusta.de>

On Sunday 09 December 2007 08:58:11 Adrian Bunk wrote:
> On Mon, Dec 03, 2007 at 09:02:19PM +1100, Rusty Russell wrote:
> > On Sunday 02 December 2007 22:22:31 Geert Uytterhoeven wrote:
> > > On Sat, 1 Dec 2007, Pierre Ossman wrote:
> > > > Yeah, that could work. Have a header with stuff like this:
> > > >
> > > > typedef u16 __attribute__((aligned(2))) aligned_u16;
> > > > typedef u32 __attribute__((aligned(4))) aligned_u32;
> > >
> > > I gave it a try:
> >
> > This seems to turn a molehill into a mountain.
> >
> > We can change that mod_devicetable.h at any time; it's not supposed to be
> > a userspace API (the kernel build system doesn't count).
>
> module-init-tools is userspace and not shipped as part of the kernel
> build system...

But module-init-tools is *not* supposed to read this; that code is a 2.4 
backwards compatibility layer which should be removed (and certainly not 
enhanced to cover new types in mod_devicetable.h!).

I repeat: this is *only* for the internal modpost code.  

> > So, just insert two bits of padding in sdio_device_id and insert a
> > comment saying "/* Explicit padding: works even if we're cross-compiling
> > */".
>
> We had one such problem in 2.6.23 and now we had a similar one in 2.6.24.
>
> Getting the alignment issues automatically right would really be an
> improvement...

Not if it makes the code (even) more obscure.  Put an attribute((packed)) on 
every structure and add an explanation at the top of the file if it makes you 
feel safer (new additions to the file are likely to copy existing ones), and 
that's sufficient.

Hope that clarifies,
Rusty.

  parent reply	other threads:[~2007-12-12  1:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-28  6:07 m68k build failure Andrew Morton
2007-11-28  8:48 ` Pierre Ossman
2007-11-28  9:00   ` Andrew Morton
2007-11-28  9:28     ` Al Viro
2007-11-28 12:29       ` Pierre Ossman
2007-11-28 12:34         ` Geert Uytterhoeven
2007-12-01 20:56           ` Pierre Ossman
2007-12-02 11:22             ` Correct types for mod_devicetable.h (was: Re: m68k build failure) Geert Uytterhoeven
2007-12-03 10:02               ` Rusty Russell
2007-12-08 21:58                 ` Adrian Bunk
2007-12-09  6:43                   ` Jon Masters
2007-12-09 17:10                   ` Pierre Ossman
2007-12-12  1:34                   ` Rusty Russell [this message]
2007-12-09 17:08               ` Pierre Ossman
2007-12-10 18:11                 ` Adrian Bunk
2007-12-10 19:12                   ` Pierre Ossman
2007-11-29 21:19       ` m68k build failure Andrew Morton
2007-11-30 17:55         ` Adrian Bunk
2007-11-28  9:24   ` Geert Uytterhoeven
2007-11-28  9:27     ` Geert Uytterhoeven
2007-11-28 10:01       ` Pierre Ossman
2007-11-28 10:07         ` Alan Cox
2007-11-28 10:23           ` Andreas Schwab
2007-11-28  9:58   ` Andreas Schwab

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=200712121234.35471.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@linux-foundation.org \
    --cc=bunk@kernel.org \
    --cc=drzeus@drzeus.cx \
    --cc=geert@linux-m68k.org \
    --cc=jonathan@jonmasters.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=sam@ravnborg.org \
    --cc=viro@ftp.linux.org.uk \
    /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