DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jeff Shaw <jeffrey.b.shaw@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] fm10k: fix clang unused function error
Date: Wed, 18 Feb 2015 10:07:40 -0800	[thread overview]
Message-ID: <1424282860-1517-1-git-send-email-jeffrey.b.shaw@intel.com> (raw)

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@intel.com>
---
 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

             reply	other threads:[~2015-02-18 18:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 18:07 Jeff Shaw [this message]
2015-02-18 18:39 ` Wiles, Keith
2015-02-24  2:12   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424282860-1517-1-git-send-email-jeffrey.b.shaw@intel.com \
    --to=jeffrey.b.shaw@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).