On Tue, Nov 21, 2023 at 01:19:12PM -0800, Jesse Brandeburg wrote:
> 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.
> 
> @prep@
> constant shift,mask;
> type T;
> expression a;
> @@
> -(((T)(a) << shift) & mask)
> +FIELD_PREP(mask, a)
> 
> Cc: Julia Lawall <[email protected]>
> Reviewed-by: Marcin Szycik <[email protected]>
> Signed-off-by: Jesse Brandeburg <[email protected]>

Reviewed-by: Simon Horman <[email protected]>

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to