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 <[email protected]>
Cc: Sasha Neftin <[email protected]>
Reviewed-by: Marcin Szycik <[email protected]>
Signed-off-by: Jesse Brandeburg <[email protected]>
---
  drivers/net/ethernet/intel/igc/igc_main.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Tested-by: Naama Meir <[email protected]>
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to