Skip to contentSkip to conversation

ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined

PATCH Applied Greg Rose 2 participants 3 messages Nov 7, 2011

Subsystems (3)
lore
Share & tools
lore

Greg Rose

author
#0 lore raw

PATCH 1/1 ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined

Fix compiler errors and warnings with CONFIG_PCI_IOV defined and not defined.

---

 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c |    2 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +2 -0
index db95731..00fcd39 100644
@@ -442,12 +442,14 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,
 
 int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter)
 {
+#ifdef CONFIG_PCI_IOV
 	int i;
 	for (i = 0; i < adapter->num_vfs; i++) {
 		if (adapter->vfinfo[i].vfdev->dev_flags &
 				PCI_DEV_FLAGS_ASSIGNED)
 			return true;
 	}
+#endif
 	return false;
 }
 
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h +2 -2
index 4a5d889..df04f1a 100644
@@ -42,11 +42,11 @@ int ixgbe_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting);
 int ixgbe_ndo_get_vf_config(struct net_device *netdev,
 			    int vf, struct ifla_vf_info *ivi);
 void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter);
-#ifdef CONFIG_PCI_IOV
 void ixgbe_disable_sriov(struct ixgbe_adapter *adapter);
+int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter);
+#ifdef CONFIG_PCI_IOV
 void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
 			const struct ixgbe_info *ii);
-int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter);
 #endif
 
 
#2 lore raw
Quoted 11 lines

-----Original Message-----
From: David Miller [mailto:[email protected]]
Sent: Monday, November 07, 2011 10:24 AM
To: Rose, Gregory V
Cc: [email protected]
Subject: Re: [net-ext PATCH] ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined

From: Greg Rose <[email protected]>
Date: Mon, 07 Nov 2011 09:44:17 -0800

Quoted 8 lines
Quoted 4 lines

Fix compiler errors and warnings with CONFIG_PCI_IOV defined and not defined.

It's "net-next" not "net-ext" :-)

Applied, thanks.

Ugh... I'm really stepping in it deep.

Thanks Dave,

- Greg