Re: [PATCH net-next] nfp: flower: cmsg: use struct_size() helper

2019-02-08 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 7 Feb 2019 21:47:25 -0600 > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo

Re: [PATCH net-next] nfp: flower: cmsg: use struct_size() helper

2019-02-08 Thread Jakub Kicinski
On Thu, 7 Feb 2019 21:47:25 -0600, Gustavo A. R. Silva wrote: > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo { >