cxgb4: Fix -Wunused-const-variable warning
authorYueHaibing <yuehaibing@huawei.com>
Tue, 1 Jun 2021 14:01:48 +0000 (22:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Jun 2021 00:00:51 +0000 (17:00 -0700)
commit6990c7f44c0dee4de6cf43fee0e5e7680c1a973a
treefdd296916a0c45ad6a46412ff16032ea7739ac3c
parente516f5be5b17cdae68d14206451b64d36f9588e4
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>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c