]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:25:24 +0000 (22:25 +0800)
Fix compiler errors and warnings with CONFIG_PCI_IOV defined and not
defined.

(cherry picked from commit 012641082b34433dac3cbb452e0a6ceccfd4643f)
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_sriov.c
drivers/net/ixgbe/ixgbe_sriov.h

index ce1e611029e481bd72ae8b7f9ed4a50543c5d06b..c8cb2f447f8830324a091e4c71ce19332eaababd 100644 (file)
@@ -440,12 +440,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 7892890deefca817032e34206bcb70ca75e6c885..1622a610b0918b81f5487d5eb307ffe77a06cb0e 100644 (file)
@@ -41,11 +41,11 @@ int ixgbe_ndo_set_vf_bw(struct net_device *netdev, int vf, int tx_rate);
 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