diff options
author | YueHaibing <yuehaibing@huawei.com> | 2021-06-01 17:01:48 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-02 03:00:51 +0300 |
commit | 6990c7f44c0dee4de6cf43fee0e5e7680c1a973a (patch) | |
tree | fdd296916a0c45ad6a46412ff16032ea7739ac3c /drivers/net | |
parent | e516f5be5b17cdae68d14206451b64d36f9588e4 (diff) | |
download | linux-6990c7f44c0dee4de6cf43fee0e5e7680c1a973a.tar.xz |
cxgb4: Fix -Wunused-const-variable warning
If CONFIG_PCI_IOV is n, make W=1 warns:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:3909:33:
warning: ‘cxgb4_mgmt_ethtool_ops’ defined but not used [-Wunused-const-variable=]
static const struct ethtool_ops cxgb4_mgmt_ethtool_ops = {
^~~~~~~~~~~~~~~~~~~~~~
Move it into #ifdef block to fix this.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 421bd9b88028..b730aa1cb141 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -3894,7 +3894,6 @@ static const struct net_device_ops cxgb4_mgmt_netdev_ops = { .ndo_set_vf_vlan = cxgb4_mgmt_set_vf_vlan, .ndo_set_vf_link_state = cxgb4_mgmt_set_vf_link_state, }; -#endif static void cxgb4_mgmt_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) @@ -3909,6 +3908,7 @@ static void cxgb4_mgmt_get_drvinfo(struct net_device *dev, static const struct ethtool_ops cxgb4_mgmt_ethtool_ops = { .get_drvinfo = cxgb4_mgmt_get_drvinfo, }; +#endif static void notify_fatal_err(struct work_struct *work) { |