1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/fm10k
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
..
fm10k.h fm10k: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
fm10k_common.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
fm10k_common.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
fm10k_dcbnl.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
fm10k_debugfs.c intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
fm10k_ethtool.c net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops 2023-12-13 22:07:16 -08:00
fm10k_iov.c fm10k: add support for ndo_get_vf_stats operation 2019-11-04 13:12:14 -08:00
fm10k_main.c fm10k: Fix error handling in fm10k_init_module() 2022-11-23 08:36:55 -08:00
fm10k_mbx.c fm10k: remove unexpected word "the" 2022-06-30 10:42:00 -07:00
fm10k_mbx.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
fm10k_netdev.c net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers). 2022-10-28 20:13:54 -07:00
fm10k_pci.c fm10k: Remove unnecessary aer.h include 2023-03-08 23:34:39 -08:00
fm10k_pf.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
fm10k_pf.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
fm10k_tlv.c intel/fm10k:fix repeated words in comments 2022-06-30 10:56:01 -07:00
fm10k_tlv.h fm10k: add missing field initializers to TLV attributes) 2019-11-04 13:12:14 -08:00
fm10k_type.h fm10k: add support for ndo_get_vf_stats operation 2019-11-04 13:12:14 -08:00
fm10k_vf.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
fm10k_vf.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
Makefile net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00