From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 1/2] ethdev: move log macro to header Date: Tue, 01 May 2018 20:56:28 +0200 Message-ID: <2051771.Q7AAqi1qgL@xps> References: <20180501172815.214973-1-ferruh.yigit@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Ferruh Yigit Return-path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id AF456DD2 for ; Tue, 1 May 2018 20:56:30 +0200 (CEST) In-Reply-To: <20180501172815.214973-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 01/05/2018 19:28, Ferruh Yigit: > --- a/lib/librte_ethdev/rte_ethdev.c > +++ b/lib/librte_ethdev/rte_ethdev.c > -static int ethdev_logtype; > - > -#define ethdev_log(level, fmt, ...) \ > - rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__) > +int ethdev_logtype; > [...] > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > +extern int ethdev_logtype; > + > +#define RTE_ETHDEV_LOG(level, fmt, ...) \ > + rte_log(RTE_LOG_ ## level, ethdev_logtype, fmt "\n", ## __VA_ARGS__) Why moving this macro in the header file? For using it in inline functions? Probably worth an explanation in the commit message.