diff options
author | Jesse Brandeburg <[email protected]> | 2023-12-05 17:01:02 -0800 |
---|---|---|
committer | Tony Nguyen <[email protected]> | 2023-12-18 11:15:53 -0800 |
commit | 4d893c104cda8961b8885737b2de73b83f7b6d0d (patch) | |
tree | 6c934fb20b888e3f540b2572e38107927b2d3bb5 /tools/perf/scripts/python/futex-contention.py | |
parent | 3314f2097dee43defc20554f961a8b17f4787e2d (diff) |
intel: legacy: field prep conversion
Refactor several older Intel drivers 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.
@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]>
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/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions