Thread (37 messages) 37 messages, 5 authors, 2023-12-06

Re: [PATCH iwl-next v1 13/13] ice: field get conversion

From: Simon Horman <horms@kernel.org>
Date: 2023-11-24 11:03:39
Also in: intel-wired-lan

On Tue, Nov 21, 2023 at 01:19:21PM -0800, Jesse Brandeburg wrote:
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@inria.fr>
Reviewed-by: Marcin Szycik <redacted>
Signed-off-by: Jesse Brandeburg <redacted>
Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help