Star64_linux/drivers/net/ethernet/google/gve
Gustavo A. R. Silva 691f4077d5 gve: 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].

Refactor the code according to the use of a flexible-array member in
struct gve_stats_report, instead of a zero-length array, and use the
struct_size() helper to calculate the size for the resource allocation.

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-10-30 16:57:41 -05:00
..
gve.h gve: Enable Link Speed Reporting in the driver. 2020-09-11 14:31:54 -07:00
gve_adminq.c gve: Enable Link Speed Reporting in the driver. 2020-09-11 14:31:54 -07:00
gve_adminq.h gve: Replace zero-length array with flexible-array member 2020-10-30 16:57:41 -05:00
gve_desc.h
gve_ethtool.c gve: Enable Link Speed Reporting in the driver. 2020-09-11 14:31:54 -07:00
gve_main.c gve: Replace zero-length array with flexible-array member 2020-10-30 16:57:41 -05:00
gve_register.h gve: Add Gvnic stats AQ command and ethtool show/set-priv-flags. 2020-09-11 14:31:54 -07:00
gve_rx.c gve: Add stats for gve. 2020-09-11 14:31:53 -07:00
gve_tx.c net: Google gve: Remove dma_wmb() before ringing doorbell 2020-01-03 12:40:53 -08:00
Makefile gve: Add ethtool support 2019-07-01 19:36:35 -07:00