From: Jeff Shaw Date: Wed, 18 Feb 2015 18:07:40 +0000 (-0800) Subject: fm10k: fix build with unused debug function X-Git-Tag: spdx-start~9596 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e8f85d7c7d240c071fb723509255d0b0f624189f;p=dpdk.git fm10k: fix build with unused debug function This commit fixes the following error which was reported when compiling with clang by moving the function inside an RTE_LIBRTE_FM10K_DEBUG_RX ifdef block. error: unused function 'dump_rxd' Signed-off-by: Jeff Shaw Acked-by: Keith Wiles --- diff --git a/lib/librte_pmd_fm10k/fm10k_rxtx.c b/lib/librte_pmd_fm10k/fm10k_rxtx.c index f6768f00c7..83bddfc741 100644 --- a/lib/librte_pmd_fm10k/fm10k_rxtx.c +++ b/lib/librte_pmd_fm10k/fm10k_rxtx.c @@ -41,11 +41,9 @@ #define rte_packet_prefetch(p) do {} while (0) #endif +#ifdef RTE_LIBRTE_FM10K_DEBUG_RX static inline void dump_rxd(union fm10k_rx_desc *rxd) { -#ifndef RTE_LIBRTE_FM10K_DEBUG_RX - RTE_SET_USED(rxd); -#endif PMD_RX_LOG(DEBUG, "+----------------|----------------+"); PMD_RX_LOG(DEBUG, "| GLORT | PKT HDR & TYPE |"); PMD_RX_LOG(DEBUG, "| 0x%08x | 0x%08x |", rxd->d.glort, @@ -62,6 +60,7 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd) PMD_RX_LOG(DEBUG, "| 0x%016lx |", rxd->q.timestamp); PMD_RX_LOG(DEBUG, "+----------------|----------------+"); } +#endif static inline void rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d)