Re: [PATCH] staging: vt665x: fix alignment constraints

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

 



On Fri, Mar 12, 2021 at 6:50 AM Edmundo Carmona Antoranz
<eantoranz@xxxxxxxxx> wrote:
>
> On Thu, Mar 11, 2021 at 11:43 PM Edmundo Carmona Antoranz
> <eantoranz@xxxxxxxxx> wrote:
> >
> > The root cause seems to be that _because_ struct ieee80211_cts is marked as __aligned(2),
> > this requires any encapsulating struct to also have an alignment of 2.
> >
>
> To make sure of this, I played with an empty struct.
>
> struct a {} __packed __aligned(2);
>
> struct structb {
>     struct a blah;
> } __packed; <--- got a warning about alignment not being 2.
>
> I would guess that setting the encapsulating struct to be __aligned(4)
> or higher would also work fine, don't know if I should be more
> thorough in that regard in the patch comment.

I think the patch description is clear enough, but it would help to include
a reference to my earlier patch that tried to fix the problem before. I don't
know why this came back now, maybe my patch was incomplete to start
with, or an extra alignment constraint was added to a second indirectly
included structure.

      Arnd



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux