commit | 5dfbbb668af9038dfa9f280ff5835dfb9c796864 | [log] [tgz] |
---|---|---|
author | Len Baker <[email protected]> | Sat Sep 18 16:21:38 2021 +0200 |
committer | Gustavo A. R. Silva <[email protected]> | Wed Oct 20 18:30:42 2021 -0500 |
tree | eabcfb587bd440ffe1202d11cb24ec14b72e4a37 | |
parent | 6446c4fb12ecc130ed9b4333372426b305a35e2b [diff] |
KVM: PPC: Replace zero-length array with flexible array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" [1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Also, make use of the struct_size() helper in kzalloc(). [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays Signed-off-by: Len Baker <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>