net/ice/base: avoid single-member variable-length structs
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 26 Aug 2020 05:23:48 +0000 (13:23 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:09 +0000 (18:55 +0200)
commit39ecbb6be0e3851482aeda3bfc1bf732264a3dfc
tree39b02070e1a67c3ecdd3ef834379f6951e71fd84
parent897aef75dc58fa85254fd91d4ffb84105a5dae13
net/ice/base: avoid single-member variable-length structs

There are a number of structures that consist of a one-element array as the
only struct member.  Some of those are unused (ice_aqc_add_get_recipe_data,
ice_aqc_get_port_options_data, ice_aqc_dis_txq, etc.) so remove them.
Others are used to index into a buffer/array consisting of a variable
number of a different data or structure type.  Those are unnecessary since
we can use simple pointer arithmetic or index directly into the buffer to
access individual elements of the buffer/array.

Additional code cleanups were done near areas affected by this change.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_adminq_cmd.h
drivers/net/ice/base/ice_common.c
drivers/net/ice/base/ice_common.h
drivers/net/ice/base/ice_dcb.c
drivers/net/ice/base/ice_sched.c
drivers/net/ice/base/ice_sched.h
drivers/net/ice/base/ice_switch.c
drivers/net/ice/base/ice_switch.h
drivers/net/ice/ice_ethdev.c