[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR11MB312230B67D2C2FF30D8B0368BD85A@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Tue, 5 Dec 2023 06:41:51 +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: Julia Lawall <Julia.Lawall@...ia.fr>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, Marcin Szycik <marcin.szycik@...ux.intel.com>,
"Brandeburg, Jesse" <jesse.brandeburg@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v1 13/13] ice: field get
conversion
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Jesse Brandeburg
> Sent: Wednesday, November 22, 2023 2:49 AM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Julia Lawall <Julia.Lawall@...ia.fr>; netdev@...r.kernel.org; Marcin Szycik <marcin.szycik@...ux.intel.com>; Brandeburg, Jesse <jesse.brandeburg@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v1 13/13] 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: Julia Lawall <Julia.Lawall@...ia.fr>
> Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_base.c | 12 +--
> drivers/net/ethernet/intel/ice/ice_common.c | 15 ++--
> 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, 81 insertions(+), 118 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists