summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/iavf/iavf_common.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2023-10-18 13:15:27 +0200
committerPaolo Abeni <pabeni@redhat.com>2023-10-19 13:23:14 +0200
commita0e6323dbae6e96af5d1acbc8bb592b56f96c65e (patch)
treeeedae9afac61a1c4de7eddfff077a55092592ae6 /drivers/net/ethernet/intel/iavf/iavf_common.c
parent878d951c6712b655c38e78ac1ee63c35cd913b22 (diff)
downloadlinux-stable-a0e6323dbae6e96af5d1acbc8bb592b56f96c65e.tar.gz
linux-stable-a0e6323dbae6e96af5d1acbc8bb592b56f96c65e.tar.bz2
linux-stable-a0e6323dbae6e96af5d1acbc8bb592b56f96c65e.zip
iavf: delete unused iavf_mac_info fields
'san_addr' and 'mac_fcoeq' members of struct iavf_mac_info are unused. 'type' is write-only. Delete all three. The function iavf_set_mac_type that sets 'type' also checks if the PCI vendor ID is Intel. This is unnecessary. Delete the whole function. If in the future there's a need for the MAC type (or other PCI ID-dependent data), I would prefer to use .driver_data in iavf_pci_tbl[] for this purpose. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20231018111527.78194-1-mschmidt@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/intel/iavf/iavf_common.c')
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_common.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_common.c b/drivers/net/ethernet/intel/iavf/iavf_common.c
index 1afd761d8052..8091e6feca01 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_common.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_common.c
@@ -7,38 +7,6 @@
#include <linux/avf/virtchnl.h>
/**
- * iavf_set_mac_type - Sets MAC type
- * @hw: pointer to the HW structure
- *
- * This function sets the mac type of the adapter based on the
- * vendor ID and device ID stored in the hw structure.
- **/
-enum iavf_status iavf_set_mac_type(struct iavf_hw *hw)
-{
- enum iavf_status status = 0;
-
- if (hw->vendor_id == PCI_VENDOR_ID_INTEL) {
- switch (hw->device_id) {
- case IAVF_DEV_ID_X722_VF:
- hw->mac.type = IAVF_MAC_X722_VF;
- break;
- case IAVF_DEV_ID_VF:
- case IAVF_DEV_ID_VF_HV:
- case IAVF_DEV_ID_ADAPTIVE_VF:
- hw->mac.type = IAVF_MAC_VF;
- break;
- default:
- hw->mac.type = IAVF_MAC_GENERIC;
- break;
- }
- } else {
- status = IAVF_ERR_DEVICE_NOT_SUPPORTED;
- }
-
- return status;
-}
-
-/**
* iavf_aq_str - convert AQ err code to a string
* @hw: pointer to the HW structure
* @aq_err: the AQ error code to convert