summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2023-12-06 04:01:04 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-12-18 22:16:15 +0300
commit9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc (patch)
tree4b8f79df0e96471e0588f17dd6e62acf56d6ef90 /drivers/net/ethernet/intel/ice
parent9e3ab72c049929afccea62a08dbaeaeee8e06c46 (diff)
downloadlinux-9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc.tar.xz
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 <Julia.Lawall@inria.fr> Cc: Ahmed Zaki <ahmed.zaki@intel.com> Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Rafal Romanowski <rafal.romanowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice')
0 files changed, 0 insertions, 0 deletions