OSDN Git Service

ice: Use bitfields where possible
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Tue, 16 Apr 2019 17:21:25 +0000 (10:21 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 4 May 2019 21:38:57 +0000 (14:38 -0700)
commit0437f1a98a2812ad8f03673f688be9b2310accf8
tree4bac6ed0baba27a688a70a1cced114efbe6396f4
parentd95276ced00060dc3d4d157b1eba61eb7830eb02
ice: Use bitfields where possible

The driver was converted to not use bool, but it was
neglected that the bools should have been converted to bit fields
as bit fields in software structures are ok, as long as they
use the correct kinds of unsigned types. This avoids
wasting lots of storage space to store single bit values.

One of the change hunks moves a variable lport out of
a group of "combinable" bit fields because all bits of
the u8 lport are valid and the variable can be packed in the
struct in struct holes.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_type.h