From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3 2/4] ethdev: move error checking macros to header Date: Wed, 04 Nov 2015 02:19:36 +0100 Message-ID: <4698587.GS9blBozDC@xps13> References: <1441811374-28984-1-git-send-email-bruce.richardson@intel.com> <1446552059-5446-1-git-send-email-bruce.richardson@intel.com> <1446552059-5446-3-git-send-email-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Bruce Richardson Return-path: Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 930588E92 for ; Wed, 4 Nov 2015 02:20:48 +0100 (CET) Received: by wmll128 with SMTP id l128so101861700wml.0 for ; Tue, 03 Nov 2015 17:20:48 -0800 (PST) In-Reply-To: <1446552059-5446-3-git-send-email-bruce.richardson@intel.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" 2015-11-03 12:00, Bruce Richardson: > Move the function ptr and port id checking macros to the header file, so > that they can be used in the static inline functions there. In doxygen > comments, mark them as for internal use only. [...] > +/** > + * @internal > + * Macro to print a message if in debugging mode > + */ > +#ifdef RTE_LIBRTE_ETHDEV_DEBUG > +#define RTE_PMD_DEBUG_TRACE(fmt, args...) \ > + RTE_LOG(ERR, PMD, "%s: " fmt, __func__, ## args) > +#else > +#define RTE_PMD_DEBUG_TRACE(fmt, args...) > +#endif It does not compile because Mellanox drivers are pedantic: In file included from /home/thomas/projects/dpdk/dpdk/drivers/net/mlx4/mlx4.c:78:0: /home/thomas/projects/dpdk/dpdk/x86_64-native-linuxapp-gcc-shared-next/include/rte_ethdev.h: At top level: /home/thomas/projects/dpdk/dpdk/x86_64-native-linuxapp-gcc-shared-next/include/rte_ethdev.h:933:38: error: ISO C does not permit named variadic macros [-Werror=variadic-macros] #define RTE_PMD_DEBUG_TRACE(fmt, args...) \