diff options
author | Jesse Brandeburg <[email protected]> | 2023-12-05 17:01:12 -0800 |
---|---|---|
committer | Tony Nguyen <[email protected]> | 2023-12-18 11:20:43 -0800 |
commit | 5a259f8e0bafaa8d2a0e6d61f1c64e10b3139901 (patch) | |
tree | a0f1b36db4f1f30cc906f73734b14a7966d62e87 /tools/rcu/rcu-cbs.py | |
parent | 65db56d5fa8f9c4ee269eeb3c85fbb6acef79c6b (diff) |
ice: field get conversion
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: Alexander Lobakin <[email protected]>
Cc: Julia Lawall <[email protected]>
Reviewed-by: Marcin Szycik <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Jesse Brandeburg <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'tools/rcu/rcu-cbs.py')
0 files changed, 0 insertions, 0 deletions