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 B1ADF2C3F for ; Fri, 1 Dec 2017 17:36:51 +0100 (CET) Received: from lfbn-1-6068-189.w90-110.abo.wanadoo.fr ([90.110.3.189] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eKoOx-0001Ks-M6; Fri, 01 Dec 2017 17:43:04 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 01 Dec 2017 17:36:40 +0100 Date: Fri, 1 Dec 2017 17:36:40 +0100 From: Olivier MATZ To: Ilya Matveychikov Cc: dev@dpdk.org Message-ID: <20171201163639.rduvosv6aq22ukpd@platinum> References: <3DBFD712-8DA6-4FDB-B139-66398039B4C0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DBFD712-8DA6-4FDB-B139-66398039B4C0@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] mbuf: cleanup rte_pktmbuf_lastseg(), remove useless variable 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: Fri, 01 Dec 2017 16:36:51 -0000 Hi Ilya, On Tue, Nov 14, 2017 at 05:44:49PM +0400, Ilya Matveychikov wrote: > Fixes: af75078fece3 ("first public release") > Cc: intel.com The Cc tag seems wrong, should be removed. > Signed-off-by: Ilya V. Matveychikov > --- > > There is no reason to have local variable m2 or am I wrong? Yes, you're right. Can you please say it in the commit log? Thanks, Olivier > > lib/librte_mbuf/rte_mbuf.h | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > index 7e326bbc2..be79e3728 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -1538,12 +1538,10 @@ static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m) > */ > static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m) > { > - struct rte_mbuf *m2 = (struct rte_mbuf *)m; > - > __rte_mbuf_sanity_check(m, 1); > - while (m2->next != NULL) > - m2 = m2->next; > - return m2; > + while (m->next != NULL) > + m = m->next; > + return m; > } > > /** > -- > 2.15.0