[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR11MB3122A2A5B5CDD04ED4FAFC99BD8DA@BL0PR11MB3122.namprd11.prod.outlook.com>
Date: Wed, 13 Dec 2023 02:58:07 +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 04/15] i40e: field prep
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 04/15] i40e: field prep conversion
>
> Refactor i40e driver to use FIELD_PREP(), which reduces lines of code
> and adds clarity of intent.
>
> This code was generated by the following coccinelle/spatch script and
> then manually repaired.
>
> Refactor one function with multiple if's to return quickly to make lines
> fit in 80 columns.
>
> @prep2@
> constant shift,mask;
> type T;
> expression a;
> @@
> -(((T)(a) << shift) & mask)
> +FIELD_PREP(mask, a)
>
> @prep@
> constant shift,mask;
> type T;
> expression a;
> @@
> -((T)((a) << shift) & mask)
> +FIELD_PREP(mask, a)
>
> 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: updated commit message
> ---
> drivers/net/ethernet/intel/i40e/i40e_common.c | 83 ++++++-------
> drivers/net/ethernet/intel/i40e/i40e_dcb.c | 116 ++++++++----------
> drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 41 +++----
> .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 +-
> 5 files changed, 109 insertions(+), 151 deletions(-)
>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists