ice: switch: unobscurify bitops loop in ice_fill_adv_dummy_packet()
authorAlexander Lobakin <alexandr.lobakin@intel.com>
Mon, 21 Mar 2022 10:59:51 +0000 (11:59 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 7 Apr 2022 15:20:10 +0000 (08:20 -0700)
commit27ffa273a0405b546b4562b1c65e616d41a1f30e
treeaa7f5ec9890fe5cdc07d4670070c39474199864f
parent135a161a5ea9e4f01b37defa53e7f5db43a7ca99
ice: switch: unobscurify bitops loop in ice_fill_adv_dummy_packet()

A loop performing header modification according to the provided mask
in ice_fill_adv_dummy_packet() is very cryptic (and error-prone).
Replace two identical cast-deferences with a variable. Replace three
struct-member-array-accesses with a variable. Invert the condition,
reduce the indentation by one -> eliminate line wraps.

Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_switch.c