lkml.org 
[lkml]   [2022]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: mainline build failure due to f1e4c916f97f ("drm/edid: add EDID block count and size helpers")
From
On 2022/06/02 16:38, Arnd Bergmann wrote:
>> But let's cc the tomoyo and chelsio people.
>
> I think both of them work because the structures are always
> embedded inside of larger structures that have at least word
> alignment. This is the thing I was looking for, and the
> __packed attribute was added in error, most likely copied
> from somewhere else.

The __packed in "struct tomoyo_shared_acl_head" is to embed next
naturally-aligned member of a larger struct into the bytes that
would have been wasted if __packed is not specified. For example,

struct tomoyo_shared_acl_head {
struct list_head list;
atomic_t users;
} __packed;

struct tomoyo_condition {
struct tomoyo_shared_acl_head head;
u32 size; /* Memory size allocated for this entry. */
(...snipped...)
};

saves 4 bytes on 64 bits build.

If the next naturally-aligned member of a larger struct is larger than
the bytes that was saved by __packed, the saved bytes will be unused.

\
 
 \ /
  Last update: 2022-06-02 13:22    [W:0.074 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site