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

Re: [Intel-wired-lan] [PATCH iwl-next v1 08/13] igc: field prep conversion

From: naamax.meir <hidden>
Date: 2023-12-05 11:17:06
Also in: intel-wired-lan

On 11/21/2023 23:19, Jesse Brandeburg wrote:
Refactor igc 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 in a later patch.

@prep@
constant shift,mask;
expression a;
@@
-((a << shift) & mask)
+FIELD_PREP(mask, a)

Cc: Julia Lawall <Julia.Lawall@inria.fr>
Cc: Sasha Neftin <redacted>
Reviewed-by: Marcin Szycik <redacted>
Signed-off-by: Jesse Brandeburg <redacted>
---
  drivers/net/ethernet/intel/igc/igc_main.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Tested-by: Naama Meir <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help