Messages in this thread | | | Subject | Re: [GIT PULL] UBI changes for 2.6.40 | From | Artem Bityutskiy <> | Date | Wed, 22 Jun 2011 07:31:10 +0300 |
| |
Hi Markus,
yes, sorry, this patch was probably a mistake - I just stupidly followed the new trend.
On Sun, 2011-06-12 at 08:40 +0200, Markus Trippelsdorf wrote: > Either reverting or using something like this fixes the problem:
However, I am a bit reluctant to revert it now because this would only hide the issue. And some googling shows that networking people had a similar error in the past and solved it by reverting before the change went upstream.
> diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h > index 3c41097..47a6c21 100644 > --- a/include/mtd/ubi-user.h > +++ b/include/mtd/ubi-user.h > @@ -23,6 +23,10 @@ > > #include <linux/types.h> > > +#ifndef __packed > +#define __packed __attribute__((packed)) > +#endif > + > /* > * UBI device creation (the same as MTD device attachment) > * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This would be a dirty hack. I think a better solution is to enhance the "scripts/headers_install.pl" script and teach it to substitute __packed with __attribute__((packed)). Then at "make headers_install" time this issue would be fixed up.
Or may be the definition of __packed has to be somehow included in ubi-user.h ...
Would you please try to make a patch and send it to lkml to hopefully generate some discussion and the right way to go would probably be found?
-- Best Regards, Artem Bityutskiy
| |