[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3122C5B0DFFB1DDA264DEE63BD8DA@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Wed, 13 Dec 2023 02:57:42 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, "Brandeburg, Jesse"
<jesse.brandeburg@...el.com>, Julia Lawall <Julia.Lawall@...ia.fr>, "Lobakin,
Aleksander" <aleksander.lobakin@...el.com>, "marcin.szycik@...ux.intel.com"
<marcin.szycik@...ux.intel.com>, "horms@...nel.org" <horms@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v2 13/15] ice: field get
conversion
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Jesse Brandeburg
> Sent: Wednesday, December 6, 2023 6:31 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Brandeburg, Jesse <jesse.brandeburg@...el.com>; Julia Lawall <Julia.Lawall@...ia.fr>; Lobakin, Aleksander <aleksander.lobakin@...el.com>; marcin.szycik@...ux.intel.com; horms@...nel.org; netdev@...r.kernel.org
> Subject: [Intel-wired-lan] [PATCH iwl-next v2 13/15] ice: field get conversion
>
> Refactor the ice 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.
>
> @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: Alexander Lobakin <aleksander.lobakin@...el.com>
> Cc: Julia Lawall <Julia.Lawall@...ia.fr>
> Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
> ---
> v2: added a couple more get conversions
> ---
> drivers/net/ethernet/intel/ice/ice_base.c | 12 +--
> drivers/net/ethernet/intel/ice/ice_common.c | 25 +++----
> drivers/net/ethernet/intel/ice/ice_dcb.c | 74 ++++++++-----------
> drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 2 +-
> .../net/ethernet/intel/ice/ice_ethtool_fdir.c | 3 +-
> drivers/net/ethernet/intel/ice/ice_lib.c | 5 +-
> drivers/net/ethernet/intel/ice/ice_main.c | 48 +++++-------
> drivers/net/ethernet/intel/ice/ice_nvm.c | 15 ++--
> drivers/net/ethernet/intel/ice/ice_ptp.c | 4 +-
> drivers/net/ethernet/intel/ice/ice_sched.c | 3 +-
> drivers/net/ethernet/intel/ice/ice_sriov.c | 3 +-
> drivers/net/ethernet/intel/ice/ice_virtchnl.c | 2 +-
> .../ethernet/intel/ice/ice_virtchnl_fdir.c | 13 ++--
> 13 files changed, 85 insertions(+), 124 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists