]> git.baikalelectronics.ru Git - kernel.git/commit
hns3: fix unused function warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 7 Aug 2017 10:41:53 +0000 (12:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 18:23:48 +0000 (11:23 -0700)
commitd2caf609bb91f1405f1cb8c837205bb7bd73ce8c
treef0eb6d8166198faeaabe60ba6cd0f353e61c5c5d
parent3868d94931a2bdcd56d1df40c9c926e1a6b432f3
hns3: fix unused function warning

Without CONFIG_PCI_IOV, we get a harmless warning about an
unused function:

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:2273:13: error: 'hclge_disable_sriov' defined but not used [-Werror=unused-function]

The #ifdefs in this driver are obviously wrong, so this just
removes them and uses an IS_ENABLED() check that does the same
thing correctly in a more readable way.

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c