]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5265d58525e24ba2b29e8228021ab69df5102ea
tree4bac6ed0baba27a688a70a1cced114efbe6396f4
parent8707d615d0842b4bcdb7f51d7b9b21851e640ad5
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