From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v1 01/10] app/test: introduce resources for tests Date: Thu, 12 May 2016 16:58:31 +0200 Message-ID: <1678450.4x7Skatt1Y@xps13> References: <1462531720-26217-1-git-send-email-viktorin@rehivetech.com> <7154696.NNSjZHJaDi@xps13> <20160506182042.411cf755@pcviktorin.fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson , David Marchand To: Jan Viktorin Return-path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id F0D576C97 for ; Thu, 12 May 2016 16:58:32 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id a17so140932457wme.0 for ; Thu, 12 May 2016 07:58:32 -0700 (PDT) In-Reply-To: <20160506182042.411cf755@pcviktorin.fit.vutbr.cz> 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" 2016-05-06 18:20, Jan Viktorin: > On Fri, 06 May 2016 16:01:08 +0200 > Thomas Monjalon wrote: > > 2016-05-06 12:48, Jan Viktorin: > > > +static struct resource linkres_ ##_n = { \ > > > + .name = RTE_STR(_n), \ > > > + .beg = _b, \ > > > + .end = _e, \ > > > +}; \ > > > +__REGISTER_RESOURCE(linkres_ ##_n) > > > > Please avoid nested macros. > > I don't understand this. I am avoiding code duplication. Is it wrong? Which code duplication? Is __REGISTER_RESOURCE used elsewhere?