On Wed, 2019-08-28 at 14:36 -0500, Gustavo A. R. Silva wrote:
> struct_size() does not apply to those scenarios. See below...
>
> > [1]:
> > https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git/tree/drivers/nvdimm/region_devs.c#n1030
>
> struct_size() only applies to structures of
Hi Vishal,
On 8/28/19 1:51 PM, Verma, Vishal L wrote:
[..]
>
> Hi Gustavo,
>
> The patch looks good to me, however it looks like it might've missed
> some instances where this replacement can be performed?
>
struct_size() does not apply to those scenarios. See below...
>
> [1]:
>
On Mon, 2019-06-10 at 16:06 -0500, 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
Hi all,
Friendly ping:
Who can take this, please?
Thanks
--
Gustavo
On 6/10/19 4:06 PM, 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
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 nd_region {
...
struct nd_mapping mapping[0];
};
instance =
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 {
int stuff;
struct boo entry[];
};
instance =