> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Jesse Brandeburg > Sent: Wednesday, December 6, 2023 2:01 AM > To: [email protected] > Cc: Kitszel, Przemyslaw <[email protected]>; Brandeburg, Jesse > <[email protected]>; Julia Lawall <[email protected]>; Lobakin, > Aleksander <[email protected]>; [email protected]; > [email protected]; [email protected] > Subject: [Intel-wired-lan] [PATCH iwl-next v2 12/15] iavf: field get > conversion > > Refactor the iavf driver to use FIELD_GET() for mask and shift reads, which > reduces lines of code and adds clarity of intent. > > This code was generated by the following coccinelle/spatch script and then > manually repaired in a later patch. > > @get@ > constant shift,mask; > type T; > expression a; > @@ > -((T)((a) & mask) >> shift) > +FIELD_GET(mask, a) > > and applied via: > spatch --sp-file field_prep.cocci --in-place --dir \ > drivers/net/ethernet/intel/ > > Cc: Julia Lawall <[email protected]> > Reviewed-by: Marcin Szycik <[email protected]> > Reviewed-by: Simon Horman <[email protected]> > Signed-off-by: Jesse Brandeburg <[email protected]> > --- > .../net/ethernet/intel/iavf/iavf_ethtool.c | 3 +-- > drivers/net/ethernet/intel/iavf/iavf_txrx.c | 20 +++++++------------ > 2 files changed, 8 insertions(+), 15 deletions(-) > > diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c > b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c > index 11150bdc63d0..90d8f1fcc3aa 100644 > --- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c > +++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
Tested-by: Rafal Romanowski <[email protected]> _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
