OSDN Git Service

ice: avoid unnecessary single-member variable-length structs
authorBruce Allan <bruce.w.allan@intel.com>
Tue, 30 Jun 2020 00:27:45 +0000 (17:27 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 1 Jul 2020 23:33:29 +0000 (16:33 -0700)
commitb3c3890489f6d3794916958d1663ab6aecb0290b
treefa3ed1c45732830e770e60631586c0a32082b722
parent8d7aab3515fa1f9774939537419fecf5247689a9
ice: avoid unnecessary 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 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>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_common.h
drivers/net/ethernet/intel/ice/ice_dcb.c
drivers/net/ethernet/intel/ice/ice_sched.c
drivers/net/ethernet/intel/ice/ice_sched.h
drivers/net/ethernet/intel/ice/ice_switch.c