linux/drivers/net/ethernet/intel/fm10k
Jesse Brandeburg 4d893c104c 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 <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>
2023-12-18 11:15:53 -08:00
..
fm10k.h
fm10k_common.c
fm10k_common.h
fm10k_dcbnl.c
fm10k_debugfs.c
fm10k_ethtool.c
fm10k_iov.c
fm10k_main.c
fm10k_mbx.c
fm10k_mbx.h
fm10k_netdev.c
fm10k_pci.c
fm10k_pf.c intel: legacy: field prep conversion 2023-12-18 11:15:53 -08:00
fm10k_pf.h
fm10k_tlv.c
fm10k_tlv.h
fm10k_type.h
fm10k_vf.c intel: add bit macro includes where needed 2023-12-18 11:15:43 -08:00
fm10k_vf.h
Makefile