From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 37B931B2A6 for ; Fri, 19 Jan 2018 11:05:06 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2018 02:05:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,381,1511856000"; d="scan'208";a="11609676" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga008.fm.intel.com with ESMTP; 19 Jan 2018 02:05:04 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 19 Jan 2018 02:05:04 -0800 Received: from bgsmsx105.gar.corp.intel.com (10.223.43.197) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 19 Jan 2018 02:05:04 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.245]) by BGSMSX105.gar.corp.intel.com ([169.254.3.4]) with mapi id 14.03.0319.002; Fri, 19 Jan 2018 15:35:01 +0530 From: "Yang, Zhiyong" To: "dev@dpdk.org" CC: "thomas@monjalon.net" , "Yigit, Ferruh" Thread-Topic: [PATCH] lib/librte_mbuf: remove void * pointer cast Thread-Index: AQHTkQWxxD9DKKtxREqWnrMruAt2lqN690HA Date: Fri, 19 Jan 2018 10:05:00 +0000 Message-ID: References: <20180119091240.25085-1-zhiyong.yang@intel.com> In-Reply-To: <20180119091240.25085-1-zhiyong.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.223.10.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] lib/librte_mbuf: remove void * pointer cast 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, 19 Jan 2018 10:05:06 -0000 =20 Drop this one since the patch doesn't follow the convention. I will resend = another new one. Thanks Zhiyong > -----Original Message----- > From: Yang, Zhiyong > Sent: Friday, January 19, 2018 5:13 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Yigit, Ferruh ; Yang, > Zhiyong > Subject: [PATCH] lib/librte_mbuf: remove void * pointer cast >=20 > It is unnecessary to cast from void * to struct rte_mbuf *, the change ca= n > make code more simple. >=20 > Signed-off-by: Zhiyong Yang > --- > lib/librte_mbuf/rte_mbuf.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h inde= x > a594e4772..2fd4f5ef9 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -896,11 +896,9 @@ rte_mbuf_sanity_check(const struct rte_mbuf *m, > int is_header); static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct > rte_mempool *mp) { > struct rte_mbuf *m; > - void *mb =3D NULL; >=20 > - if (rte_mempool_get(mp, &mb) < 0) > + if (rte_mempool_get(mp, (void **)&m) < 0) > return NULL; > - m =3D (struct rte_mbuf *)mb; > MBUF_RAW_ALLOC_CHECK(m); > return m; > } > -- > 2.13.3