lkml.org 
[lkml]   [2020]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] can: Replace zero-length array with flexible-array
From
Date
Hi Gustavo,

On 04.06.20 02:58, Gustavo A. R. Silva wrote:

> Sorry for the late reply. I totally lost track of this thread. :/

NP. At least your workflow seems to work :o)

> pahole shows exactly the same output either if cf is a zero-length array or
> a flexible-array member:
>
> $ pahole -C 'can_skb_priv' drivers/net/can/dev.o
>
> struct can_skb_priv {
> int ifindex; /* 0 4 */
> int skbcnt; /* 4 4 */
> struct can_frame cf[] __attribute__((__aligned__(8))); /* 8 0 */
>
> /* size: 8, cachelines: 1, members: 3 */
> /* forced alignments: 1 */
> /* last cacheline: 8 bytes */
> } __attribute__((__aligned__(8)));
>
> So, it seems everything should fine. :)

Great! Thanks for the info - and how I could have checked it on my own, too.

Best,
Oliver

\
 
 \ /
  Last update: 2020-06-04 08:38    [W:0.049 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site