Search Linux Wireless

Re: [PATCH] WAVELAN - compile-time check for struct sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 06, 2008 at 01:04:48PM -0800, Andrew Morton wrote:
> On Wed, 6 Feb 2008 21:50:23 +0100
> Helge Deller <deller@xxxxxx> wrote:
> 
> > > > +	/* compile-time check the sizes of structures */
> > > > +	BUILD_BUG_ON(sizeof(psa_t) != PSA_SIZE);
> > > > +	BUILD_BUG_ON(sizeof(mmw_t) != MMW_SIZE);
> > > 
> > > This assertion is now triggering with arm allmodconfig.
> > > 
> > > Rafael, please track this as a post-2.6.24 regression.
> > 
> > Hello Andrew,
> > 
> > with which arm platform did you found this assertion to trigger ?
> > I tried a few (e.g. ARM-poodle and CONFIG_ARCH_SA1100 w/ISA) but didn't saw it breaking.
> > Maybe you could send me you .config file ?
> > 
> 
> allmodconfig
> 
> > 
> > PS: I tried Linus' current git tree which now includes my patch above as well.
> 
> The assertion triggers with current mainline.  I'm using gcc-3.4.5, from
> http://userweb.kernel.org/~akpm/cross-compilers/

I assume that it's the second BUILD_BUG_ON() which is triggering?

Given that:

#define MMW_SIZE        37

is not a multiple of sizeof(unsigned long) this is hardly surprising.

If structures are used to define a layout of something and must not
contain compiler padding, it must be packed.  Given these structures
contain just unsigned char, there's no concerns about >8bit loads
becoming less efficient.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux