Re: [PATCH mdadm] super-intel: don't mark structs 'packed' unnecessarily

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

 



On 10/31/19 5:15 AM, NeilBrown wrote:
> 
> super-intel marks a number of structures 'packed', but this
> doesn't change the layout - they are already well organized.
> 
> This is a problem a gcc warns when code takes the address
> of a field in a packet struct - as super-intel sometimes does.
> 
> So remove the marking where isn't needed.
> Do ensure this does introduce a regression, add a compile-time
> assertion that the size of the structure is exactly the value
> it had before the 'packed' notation was removed.
> 
> Note that a couple of structure do need to be packed.
> As the address of fields is never taken, that is safe.
> 
> Signed-off-by: NeilBrown <neilb@xxxxxxx>

Good idea!

Acked-by: Artur Paszkiewicz <artur.paszkiewicz@xxxxxxxxx>




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux