Messages in this thread | | | From | "Penigalapati, Sandeep" <> | Subject | RE: [Intel-wired-lan] [PATCH v4 net-next 2/5] ice: switch: unobscurify bitops loop in ice_fill_adv_dummy_packet() | Date | Fri, 25 Mar 2022 10:24:26 +0000 |
| |
>-----Original Message----- >From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of >Alexander Lobakin >Sent: Monday, March 21, 2022 4:30 PM >To: intel-wired-lan@lists.osuosl.org >Cc: Szapar-Mudlaw, Martyna <martyna.szapar-mudlaw@intel.com>; >netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jakub Kicinski ><kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; David S. Miller ><davem@davemloft.net> >Subject: [Intel-wired-lan] [PATCH v4 net-next 2/5] 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> >--- > drivers/net/ethernet/intel/ice/ice_switch.c | 16 +++++++++------- > 1 file changed, 9 insertions(+), 7 deletions(-) > Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
| |