Re: [PATCH] sparc: use struct_size() in kzalloc()

2019-04-10 Thread Gustavo A. R. Silva
Hi Dave, I wonder if you can take this. Thanks -- Gustavo On 1/8/19 10:13 AM, 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

Re: [PATCH] sparc: use struct_size() in kzalloc()

2019-02-25 Thread David Miller
From: "Gustavo A. R. Silva" Date: Tue, 8 Jan 2019 10:13:56 -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

[PATCH] sparc: use struct_size() in kzalloc()

2019-01-08 Thread Gustavo A. R. Silva
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; void *entry[]; }; instance = kzalloc(sizeof(struct foo