linux/drivers/net/ethernet/intel/ixgbe
Jesse Brandeburg b9a4525450 intel: legacy: field get conversion
Refactor several older Intel drivers to use FIELD_GET(), which reduces
lines of code and adds clarity of intent.

This code was generated by the following coccinelle/spatch script and
then manually repaired.

@get@
constant shift,mask;
type T;
expression a;
@@
(
-((T)((a) & mask) >> shift)
+FIELD_GET(mask, a)

and applied via:
spatch --sp-file field_prep.cocci --in-place --dir \
 drivers/net/ethernet/intel/

Cc: Julia Lawall <Julia.Lawall@inria.fr>
CC: Alexander Lobakin <aleksander.lobakin@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: 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:20:43 -08:00
..
ixgbe.h
ixgbe_82598.c intel: legacy: field prep conversion 2023-12-18 11:15:53 -08:00
ixgbe_82599.c
ixgbe_common.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_common.h
ixgbe_dcb.c
ixgbe_dcb.h
ixgbe_dcb_82598.c
ixgbe_dcb_82598.h
ixgbe_dcb_82599.c
ixgbe_dcb_82599.h
ixgbe_dcb_nl.c
ixgbe_debugfs.c
ixgbe_ethtool.c net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
ixgbe_fcoe.c intel: legacy: field prep conversion 2023-12-18 11:15:53 -08:00
ixgbe_fcoe.h
ixgbe_ipsec.c
ixgbe_ipsec.h
ixgbe_lib.c
ixgbe_main.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_mbx.c
ixgbe_mbx.h
ixgbe_model.h
ixgbe_phy.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_phy.h
ixgbe_ptp.c
ixgbe_sriov.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_sriov.h
ixgbe_sysfs.c
ixgbe_txrx_common.h
ixgbe_type.h
ixgbe_x540.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_x540.h
ixgbe_x550.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
ixgbe_xsk.c net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush(). 2023-10-03 07:34:51 -07:00
Makefile