Re: [PATCH] crypto: qat - use struct_size() helper

2019-06-13 Thread Herbert Xu
On Thu, Jun 06, 2019 at 09:57:13AM -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 q

[PATCH] crypto: qat - use struct_size() helper

2019-06-06 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 qat_alg_buf_list { ... struct qat_alg_buf bufers[]; } __packed _