[lkml]   [2019]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] gpu: drm: use struct_size() in kmalloc()

On 5/21/19 3:59 AM, Christian König wrote:

> BTW: Is there actually good documentation how to correctly do the variable length array at end of structure thing in the kernel?
> I do know that I've seen a lot of different variants like array[] array[0] or array[1] and I have also seen a bunch of gcc versions failing to generate correct
> code for some of them.
> So we should probably nail down how to do things correctly.

A flexible array member is the preferred[1] mechanism:



 \ /
  Last update: 2019-05-21 15:23    [W:0.053 / U:2.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site