From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 3E2FD1B1AA for ; Mon, 19 Mar 2018 18:35:00 +0100 (CET) Received: from lfbn-lil-1-702-109.w81-254.abo.wanadoo.fr ([81.254.39.109] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1exyh0-00079X-Ag; Mon, 19 Mar 2018 18:35:31 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 19 Mar 2018 18:34:57 +0100 Date: Mon, 19 Mar 2018 18:34:57 +0100 From: Olivier Matz To: Anatoly Burakov Cc: dev@dpdk.org, keith.wiles@intel.com, jianfeng.tan@intel.com, andras.kovacs@ericsson.com, laszlo.vadkeri@ericsson.com, benjamin.walker@intel.com, bruce.richardson@intel.com, thomas@monjalon.net, konstantin.ananyev@intel.com, kuralamudhan.ramakrishnan@intel.com, louise.m.daly@intel.com, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, pepperjo@japf.ch, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com Message-ID: <20180319173457.cbxyj2pummor2g5i@platinum> References: <757ab0a9ebe0e921c2ab77562cb0333da8334c50.1520083504.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <757ab0a9ebe0e921c2ab77562cb0333da8334c50.1520083504.git.anatoly.burakov@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 08/41] eal: make malloc free return resulting malloc element X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 17:35:00 -0000 On Sat, Mar 03, 2018 at 01:45:56PM +0000, Anatoly Burakov wrote: > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/common/malloc_elem.c | 4 ++-- > lib/librte_eal/common/malloc_elem.h | 2 +- > lib/librte_eal/common/malloc_heap.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c > index 008f5a3..c18f050 100644 > --- a/lib/librte_eal/common/malloc_elem.c > +++ b/lib/librte_eal/common/malloc_elem.c > @@ -379,7 +379,7 @@ malloc_elem_join_adjacent_free(struct malloc_elem *elem) > * blocks either immediately before or immediately after newly freed block > * are also free, the blocks are merged together. > */ > -int > +struct malloc_elem * > malloc_elem_free(struct malloc_elem *elem) > { > void *ptr; > @@ -397,7 +397,7 @@ malloc_elem_free(struct malloc_elem *elem) > > memset(ptr, 0, data_len); > > - return 0; > + return elem; > } > > /* An explanation about why this change is needed would make sense I think. Thanks, Olivier