From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH 2/2] net/thunderx: fix unused function nicvf_mbox_msg_str error Date: Tue, 28 Jun 2016 09:56:02 +0100 Message-ID: <57723BA2.6000002@intel.com> References: <1467044166-31912-1-git-send-email-jerin.jacob@caviumnetworks.com> <1467044166-31912-2-git-send-email-jerin.jacob@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com To: Jerin Jacob , dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6D8D82C5A for ; Tue, 28 Jun 2016 10:56:05 +0200 (CEST) In-Reply-To: <1467044166-31912-2-git-send-email-jerin.jacob@caviumnetworks.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 6/27/2016 5:16 PM, Jerin Jacob wrote: > Fix the following error with clang > error: unused function 'nicvf_mbox_msg_str' >=20 > 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 >=20 > Fixes: e93592f1 ("net/thunderx/base: add mbox APIs for PF/VF communicat= ion") >=20 > Signed-off-by: Jerin Jacob > Reported-by: Ferruh Yigit ... > -static inline const char * > +static inline const char * __attribute__((unused)) it is possible to use __rte_unused macro here, although not required, and moving it before return type can prevent checkpatch error > nicvf_mbox_msg_str(int msg) > { > assert(msg >=3D 0 && msg < NIC_MBOX_MSG_MAX); >=20 Checkpatch gives following error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #39: FILE: drivers/net/thunderx/base/nicvf_mbox.c:67: +static inline const char * __attribute__((unused)) check-git-log gives following errors: Wrong headline format: net/thunderx: fix unused function nicvf_mbox_msg_str error