]> git.itanic.dy.fi Git - linux-stable/commit
net: vxge: avoid unused function warnings
authorArnd Bergmann <arnd@arndb.de>
Fri, 29 Jan 2016 11:39:13 +0000 (12:39 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:33:53 +0000 (13:33 +0000)
commitd09dfb2ac3aa9aa881cd3dd60fae4a6bfa7a77eb
treeb03a18e2a1d1e2b63af1afff27ad221c0390efc9
parenta7e32b7be60e4dc4d83f4b05e021626c90858c29
net: vxge: avoid unused function warnings

commit 57e7c8cef224af166b8ec932b5e383641418c005 upstream.

When CONFIG_PCI_MSI is disabled, we get warnings about unused functions
in the vxge driver:

drivers/net/ethernet/neterion/vxge/vxge-main.c:2121:13: warning: 'adaptive_coalesce_tx_interrupts' defined but not used [-Wunused-function]
drivers/net/ethernet/neterion/vxge/vxge-main.c:2149:13: warning: 'adaptive_coalesce_rx_interrupts' defined but not used [-Wunused-function]

We could add another #ifdef here, but it's nicer to avoid those warnings
for good by converting the existing #ifdef to if(IS_ENABLED()), which has
the same effect but provides better compile-time coverage in general,
and lets the compiler understand better when the function is intentionally
unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/neterion/vxge/vxge-main.c