diff options
| author | Jesse Brandeburg <[email protected]> | 2023-12-06 01:01:07 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2023-12-18 19:20:43 +0000 |
| commit | c82e64868afd2656452b430c3976a8b39f1cafe5 (patch) | |
| tree | e0ea3999bc465bfcbd862cf2afd205c644fb8edd /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |
| parent | ice: fix pre-shifted bit usage (diff) | |
| download | kernel-c82e64868afd2656452b430c3976a8b39f1cafe5.tar.gz kernel-c82e64868afd2656452b430c3976a8b39f1cafe5.zip | |
igc: field prep conversion
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.
@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 <[email protected]>
Cc: Sasha Neftin <[email protected]>
Reviewed-by: Marcin Szycik <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Jesse Brandeburg <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_main.c')
0 files changed, 0 insertions, 0 deletions
