[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-raid
Subject: Re: [PATCH mdadm] super-intel: don't mark structs 'packed' unnecessarily
From: Artur Paszkiewicz <artur.paszkiewicz () intel ! com>
Date: 2019-10-31 11:50:24
Message-ID: 7107c82a-762c-4049-307a-b0e4244cb15a () intel ! com
[Download RAW message or body]
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@suse.de>
Good idea!
Acked-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic