Re: [PATCH] can: Replace zero-length array with flexible-array

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

 



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



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux