1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/iavf
Jesse Brandeburg 65db56d5fa iavf: field get conversion
Refactor the iavf driver to use FIELD_GET() for mask and shift reads,
which reduces lines of code and adds clarity of intent.

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

@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>
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>
2023-12-18 11:20:43 -08:00
..
iavf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-12-14 17:14:41 -08:00
iavf_adminq.c iavf: Remove queue tracking fields from iavf_adminq_ring 2023-11-27 09:34:04 -08:00
iavf_adminq.h iavf: Remove queue tracking fields from iavf_adminq_ring 2023-11-27 09:34:04 -08:00
iavf_adminq_cmd.h iavf: replace i40e variables with iavf 2019-05-31 01:02:53 -07:00
iavf_adv_rss.c iavf: enable symmetric-xor RSS for Toeplitz hash function 2023-12-13 22:07:17 -08:00
iavf_adv_rss.h iavf: enable symmetric-xor RSS for Toeplitz hash function 2023-12-13 22:07:17 -08:00
iavf_alloc.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_common.c iavf: field prep conversion 2023-12-18 11:16:15 -08:00
iavf_devids.h
iavf_ethtool.c iavf: field get conversion 2023-12-18 11:20:43 -08:00
iavf_fdir.c iavf: field prep conversion 2023-12-18 11:16:15 -08:00
iavf_fdir.h iavf: Introduce new state machines for flow director 2023-12-12 11:20:40 -08:00
iavf_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-12-14 17:14:41 -08:00
iavf_osdep.h iavf: remove some unused functions and pointless wrappers 2023-06-22 09:26:55 -07:00
iavf_prototype.h iavf: delete unused iavf_mac_info fields 2023-10-19 13:23:14 +02:00
iavf_register.h iavf: remove mask from iavf_irq_enable_queues() 2023-06-10 00:09:54 -07:00
iavf_status.h virtchnl: i40e/iavf: rename iwarp to rdma 2023-01-25 08:55:19 -08:00
iavf_trace.h intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
iavf_txrx.c iavf: field get conversion 2023-12-18 11:20:43 -08:00
iavf_txrx.h iavf: validate tx_coalesce_usecs even if rx_coalesce_usecs is zero 2023-12-05 10:51:22 -08:00
iavf_type.h iavf: delete unused iavf_mac_info fields 2023-10-19 13:23:14 +02:00
iavf_virtchnl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-12-14 17:14:41 -08:00
Makefile iavf: delete the iavf client interface 2023-10-27 15:35:49 -07:00