aboutsummaryrefslogtreecommitdiff
path: root/crypto/des_generic.c
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2023-12-05 17:01:03 -0800
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-12-18 11:16:03 -0800
commit9e3ab72c049929afccea62a08dbaeaeee8e06c46 (patch)
tree14ed1042fde53e33790efe801a9473220979c51f /crypto/des_generic.c
parent4d893c104cda8961b8885737b2de73b83f7b6d0d (diff)
i40e: field prep conversion
Refactor i40e 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. Refactor one function with multiple if's to return quickly to make lines fit in 80 columns. @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> 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: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'crypto/des_generic.c')
0 files changed, 0 insertions, 0 deletions