DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: <dev@dpdk.org>
Cc: <thomas.monjalon@6wind.com>, <bruce.richardson@intel.com>,
	<ferruh.yigit@intel.com>,
	Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 2/2] net/thunderx: fix unused function nicvf_mbox_msg_str error
Date: Mon, 27 Jun 2016 21:46:06 +0530	[thread overview]
Message-ID: <1467044166-31912-2-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1467044166-31912-1-git-send-email-jerin.jacob@caviumnetworks.com>

Fix the following error with clang
	error: unused function 'nicvf_mbox_msg_str'

The nicvf_mbox_msg_str() maybe unused, based on DEBUG
compilation option selected. Mark __attribute__((unused)) on
this function, to inform compiler that this function may be unused

Fixes: e93592f1 ("net/thunderx/base: add mbox APIs for PF/VF communication")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/base/nicvf_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 3067331..9c5cd83 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -64,7 +64,7 @@ static const char *mbox_message[NIC_MBOX_MSG_MAX] =  {
 	[NIC_MBOX_MSG_SHUTDOWN]           = "NIC_MBOX_MSG_SHUTDOWN",
 };
 
-static inline const char *
+static inline const char * __attribute__((unused))
 nicvf_mbox_msg_str(int msg)
 {
 	assert(msg >= 0 && msg < NIC_MBOX_MSG_MAX);
-- 
2.5.5

  reply	other threads:[~2016-06-27 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-27 16:16 [dpdk-dev] [PATCH 1/2] net/thunderx: select -fno-prefetch-loop-arrays only for gcc Jerin Jacob
2016-06-27 16:16 ` Jerin Jacob [this message]
2016-06-28  8:56   ` [dpdk-dev] [PATCH 2/2] net/thunderx: fix unused function nicvf_mbox_msg_str error Ferruh Yigit
2016-06-29 10:39     ` Bruce Richardson
2016-06-29 10:43       ` Bruce Richardson
2016-06-28  8:55 ` [dpdk-dev] [PATCH 1/2] net/thunderx: select -fno-prefetch-loop-arrays only for gcc Ferruh Yigit
2016-06-29 10:39   ` Bruce Richardson
2016-06-29 10:43     ` Bruce Richardson

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=1467044166-31912-2-git-send-email-jerin.jacob@caviumnetworks.com \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas.monjalon@6wind.com \
    /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).