aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_flex_pipe.c
diff options
context:
space:
mode:
authorJesse Brandeburg <[email protected]>2023-12-06 01:01:04 +0000
committerTony Nguyen <[email protected]>2023-12-18 19:16:15 +0000
commit9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc (patch)
tree4b8f79df0e96471e0588f17dd6e62acf56d6ef90 /drivers/net/ethernet/intel/ice/ice_flex_pipe.c
parenti40e: field prep conversion (diff)
downloadkernel-9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc.tar.gz
kernel-9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc.zip
iavf: field prep conversion
Refactor iavf 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. Clean up a couple spots in the code that had repetitive y = cpu_to_*((blah << blah_blah) & blat) y |= cpu_to_*((blahs << blahs_blahs) & blats) to x = FIELD_PREP(blat blah) x |= FIELD_PREP(blats, blahs) y = cpu_to_*(x); @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: Ahmed Zaki <[email protected]> Reviewed-by: Marcin Szycik <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_flex_pipe.c')
0 files changed, 0 insertions, 0 deletions