Skip to content
Commit 01081be1 authored by José Expósito's avatar José Expósito Committed by Jakub Kicinski
Browse files

net: prestera: replace zero-length array with flexible-array member

One-element and zero-length arrays are deprecated and should be
replaced with flexible-array members:
https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Replace zero-length array with flexible-array member and make use
of the struct_size() helper.

Link: https://github.com/KSPP/linux/issues/78


Signed-off-by: default avatarJosé Expósito <jose.exposito89@gmail.com>
Reviewed-by: default avatarVolodymyr Mytnyk <vmytnyk@marvell.com>
Tested-by: default avatarVolodymyr Mytnyk <vmytnyk@marvell.com>
Reviewed-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20211204171349.22776-1-jose.exposito89@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5382911f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment