ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined
authorRose, Gregory V <gregory.v.rose@intel.com>
Mon, 7 Nov 2011 07:44:17 +0000 (07:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2011 18:23:12 +0000 (13:23 -0500)
Fix compiler errors and warnings with CONFIG_PCI_IOV defined and not
defined.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h

index db95731863d75bf470ce660b13de951f50670eed..00fcd39ad666b6c289379e401800438347952dd7 100644 (file)
@@ -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;
 }
 
index 4a5d8897faab47ec93358c7a7d16c4b44d983b83..df04f1a3857c96e5e16b4098580d2904c5c33a2e 100644 (file)
@@ -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