diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-09-30 12:15:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-03 01:33:15 -0400 |
commit | 7c70c4f8b2bf5ed777120f3d70efe35e64930c10 (patch) | |
tree | 2262c1c256a12de14f46cf27a0f9d6dbb84542c9 /drivers/net | |
parent | fa34cd94fb01fcb8d79d91e009451b37692e94e5 (diff) |
cxgb4: unexport cxgb4_dcb_enabled
A recent cleanup marked cxgb4_dcb_enabled as 'static', which is correct, but this ignored
how the symbol is also exported. In addition, the export can be compiled out when modules
are disabled, causing a harmless compiler warning in configurations for which it is not
used at all:
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:282:12: error: 'cxgb4_dcb_enabled' defined but not used [-Werror=unused-function]
This removes the export and moves the function into the correct #ifdef so we only build
it when there are users.
Fixes: 50935857f878 ("cxgb4: mark symbols static where possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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 | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 08e69d31dbaa..cf147ca419a8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -277,11 +277,9 @@ static void dcb_tx_queue_prio_enable(struct net_device *dev, int enable) | |||
277 | txq->dcb_prio = value; | 277 | txq->dcb_prio = value; |
278 | } | 278 | } |
279 | } | 279 | } |
280 | #endif /* CONFIG_CHELSIO_T4_DCB */ | ||
281 | 280 | ||
282 | static int cxgb4_dcb_enabled(const struct net_device *dev) | 281 | static int cxgb4_dcb_enabled(const struct net_device *dev) |
283 | { | 282 | { |
284 | #ifdef CONFIG_CHELSIO_T4_DCB | ||
285 | struct port_info *pi = netdev_priv(dev); | 283 | struct port_info *pi = netdev_priv(dev); |
286 | 284 | ||
287 | if (!pi->dcb.enabled) | 285 | if (!pi->dcb.enabled) |
@@ -289,11 +287,8 @@ static int cxgb4_dcb_enabled(const struct net_device *dev) | |||
289 | 287 | ||
290 | return ((pi->dcb.state == CXGB4_DCB_STATE_FW_ALLSYNCED) || | 288 | return ((pi->dcb.state == CXGB4_DCB_STATE_FW_ALLSYNCED) || |
291 | (pi->dcb.state == CXGB4_DCB_STATE_HOST)); | 289 | (pi->dcb.state == CXGB4_DCB_STATE_HOST)); |
292 | #else | ||
293 | return 0; | ||
294 | #endif | ||
295 | } | 290 | } |
296 | EXPORT_SYMBOL(cxgb4_dcb_enabled); | 291 | #endif /* CONFIG_CHELSIO_T4_DCB */ |
297 | 292 | ||
298 | void t4_os_link_changed(struct adapter *adapter, int port_id, int link_stat) | 293 | void t4_os_link_changed(struct adapter *adapter, int port_id, int link_stat) |
299 | { | 294 | { |