* [PATCH] fm10k: fix clang unused function error
@ 2015-02-18 18:07 Jeff Shaw
[not found] ` <1424282860-1517-1-git-send-email-jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Shaw @ 2015-02-18 18:07 UTC (permalink / raw)
To: dev-VfR2kkLFssw
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 <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
lib/librte_pmd_fm10k/fm10k_rxtx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/librte_pmd_fm10k/fm10k_rxtx.c b/lib/librte_pmd_fm10k/fm10k_rxtx.c
index f6768f0..83bddfc 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)
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1424282860-1517-1-git-send-email-jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] fm10k: fix clang unused function error [not found] ` <1424282860-1517-1-git-send-email-jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2015-02-18 18:39 ` Wiles, Keith [not found] ` <D10A385B.13CDD%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Wiles, Keith @ 2015-02-18 18:39 UTC (permalink / raw) To: Shaw, Jeffrey B, dev-VfR2kkLFssw@public.gmane.org On 2/18/15, 12:07 PM, "Shaw, Jeffrey B" <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote: >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 <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Acked-by: keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org >--- > lib/librte_pmd_fm10k/fm10k_rxtx.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > >diff --git a/lib/librte_pmd_fm10k/fm10k_rxtx.c >b/lib/librte_pmd_fm10k/fm10k_rxtx.c >index f6768f0..83bddfc 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) >-- >2.1.0 > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <D10A385B.13CDD%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] fm10k: fix clang unused function error [not found] ` <D10A385B.13CDD%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> @ 2015-02-24 2:12 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2015-02-24 2:12 UTC (permalink / raw) To: Shaw, Jeffrey B; +Cc: dev-VfR2kkLFssw > >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 <jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > > Acked-by: keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Applied, thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-24 2:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 18:07 [PATCH] fm10k: fix clang unused function error Jeff Shaw
[not found] ` <1424282860-1517-1-git-send-email-jeffrey.b.shaw-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-18 18:39 ` Wiles, Keith
[not found] ` <D10A385B.13CDD%keith.wiles-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-24 2:12 ` Thomas Monjalon
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.