public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Rob Landley <rob@landley.net>
Cc: Michal Marek <mmarek@suse.cz>,
	"Adrian.Hunter" <Adrian.Hunter@intel.com>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	linux-kernel@vger.kernel.org, busybox@busybox.net
Subject: Re: [BUG] Linux 3.0 commit 3627924acf70a broke include/mtd/ubi_user.h.
Date: Mon, 15 Aug 2011 06:42:27 +0300	[thread overview]
Message-ID: <1313379749.2200.11.camel@koala> (raw)
In-Reply-To: <1313379564.2200.9.camel@koala>

On Mon, 2011-08-15 at 06:39 +0300, Artem Bityutskiy wrote:
> On Sun, 2011-08-14 at 14:16 -0500, Rob Landley wrote:
> > On 08/14/2011 01:03 PM, Stefan Richter wrote:
> > > On Aug 14 Rob Landley wrote:
> > >> "make headers_install" copies include/mtd/ubi_user.h to userspace, where
> > >> things like busybox link against it.  With 3.0, building defconfig
> > >> busybox gets this error:
> > >>
> > >> In file included from miscutils/ubi_tools.c:63:
> > >> /home/landley/aboriginal/aboriginal/build/simple-cross-compiler-i686/bin/../include/mtd/ubi-user.h:329:
> > >> error: conflicting types for '__packed'
> > >> /home/landley/aboriginal/aboriginal/build/simple-cross-compiler-i686/bin/../include/mtd/ubi-user.h:313:
> > >> error: previous declaration of '__packed' was here
> > >>
> > >> This is due to the Linux 3.0 commit in the title:
> > >>
> > >>     UBI: use __packed instead of __attribute__((packed))
> > >>
> > >> This relies on __packed being defined in:
> > >>
> > >>   include/linux/compiler-gcc.h:
> > >>   #define __packed			__attribute__((packed))
> > >>
> > >> Which is not exported to userspace.
> > >>
> > >> I.E. this "cleanup" broke the ability for userspace to use this header,
> > >> even though the header is exported to userspace by headers_install.
> > > 
> > > As far as I can tell, the __packed or __attribute__((packed))
> > > qualifications are superfluous in include/mtd/ubi-user.h anyway.
> > 
> > And Adrian Hunter <adrian.hunter@nokia.com> (the other listed UBI
> > maintainer) also bounces.  Did the developer exodus after Nokia decided
> > to cozy up to The Black Widow take 'em both out?
> 
> Yes, both of us have left Nokia recently. Adrian should fix the
> "MAINTAINERS" file.
> 
> WRT to the breakage - yes, it was my mistake to follow the new trend in
> the Linux kernel - the commit message has a reference to the other
> commit which inspired the check, and you can find out that some other
> projects made a similar change. Moreover, checkpatch.pl prints the
> following warning "WARN("__packed is preferred over
> __attribute__((packed))". So you hardly can blame :-)
> 
> Anyways, this problem was discussed in the "__packed vs.
> __attribute__((packed)) in kernel headers" thread in LKML.
> 
> Then a fix has been sent, see the "{PATCH] fix __packed in exported
> kernel headers" thread in LKML. This fix was accepted by "Michal Marek
> <mmarek@suse.cz>", whom I put to CC.

And the fix is upstream, see:

commit f210735fe2f17a6225432ee3d1239bcf23a8659c
Author: Markus Trippelsdorf <markus@trippelsdorf.de>
Date:   Fri Jun 24 15:51:00 2011 +0200

Probably someone can ping the -stable team and ask them to take it to
linux-3.0-stable?

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)


      reply	other threads:[~2011-08-15  3:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-14 17:45 [BUG] Linux 3.0 commit 3627924acf70a broke include/mtd/ubi_user.h Rob Landley
2011-08-14 18:03 ` Stefan Richter
2011-08-14 19:11   ` Rob Landley
2011-08-14 19:16   ` Rob Landley
2011-08-15  3:39     ` Artem Bityutskiy
2011-08-15  3:42       ` Artem Bityutskiy [this message]

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=1313379749.2200.11.camel@koala \
    --to=dedekind1@gmail.com \
    --cc=Adrian.Hunter@intel.com \
    --cc=busybox@busybox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=rob@landley.net \
    --cc=stefanr@s5r6.in-berlin.de \
    /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