From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1EBA7A0544; Wed, 24 Aug 2022 13:52:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9B4F40DDE; Wed, 24 Aug 2022 13:52:51 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id E46044067B; Wed, 24 Aug 2022 13:52:50 +0200 (CEST) Content-class: urn:content-classes:message Subject: RE: [RFC v3 08/26] dev: move unrelated macros from header MIME-Version: 1.0 Date: Wed, 24 Aug 2022 13:52:46 +0200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D872A4@smartserver.smartshare.dk> X-MimeOLE: Produced By Microsoft Exchange V6.5 In-Reply-To: <3629884.MHq7AAxBmi@thomas> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC v3 08/26] dev: move unrelated macros from header Thread-Index: Adi3jKPldwpNFNCgSKacXppFEMt8bAAI0kOQ References: <20220628144643.1213026-1-david.marchand@redhat.com> <3629884.MHq7AAxBmi@thomas> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Thomas Monjalon" , "Bruce Richardson" , , "David Marchand" Cc: "dev" , "Fan Zhang" , "Ashish Gupta" , "Qiming Yang" , "Wenjun Wu" , "Shijith Thotton" , "Srisivasubramanian Srinivasan" , "Chengwen Feng" , "Kevin Laatz" , "Ferruh Yigit" , "Andrew Rybchenko" , "Olivier Matz" , "Ori Kam" , "Akhil Goyal" , "Maxime Coquelin" , "Chenbo Xia" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Thomas Monjalon [mailto:thomas@monjalon.net] > Sent: Wednesday, 24 August 2022 09.39 >=20 > 24/08/2022 08:50, David Marchand: > > On Fri, Jul 29, 2022 at 3:22 PM David Marchand > > wrote: > > > > > > On Fri, Jul 29, 2022 at 11:59 AM Bruce Richardson > > > wrote: > > > > > > Personally, I really don't like these macros at all. I think > having the > > > > > > check explicitly in the code would be far more readable, and > would only be > > > > > > one line of code longer than the macro call. Is there some > private header > > > > > > file we could move these to instead of rte_common.h so we = can > drop their > > > > > > use in future if we decide to? > > > > > > > > > > I don't like them either. > > > > > Not sure where to put them though... > > > > > > > > > > My "grep-all" shows no user in the projects consuming DPDK I > track. > > > > > We could mark those macros deprecated, fix our code and drop > them later. > > > > > > > > > +1 to that. > > > > Can they be marked as deprecated as part of the move perhaps > (assuming we > > > > get agreement to kill them?) > > > > Let's see if techboard members have an opinion. >=20 > These macros have no added value for an external user. > I think it is OK to mark them deprecated and plan for a future = removal. +1 from a community member :-) >=20 > Copy of the code for the context: >=20 > /** Macros to check for invalid function pointers. */ > #define RTE_FUNC_PTR_OR_ERR_RET(func, retval) do { \ > if ((func) =3D=3D NULL) \ > return retval; \ > } while (0) >=20 > #define RTE_FUNC_PTR_OR_RET(func) do { \ > if ((func) =3D=3D NULL) \ > return; \ > } while (0) >=20 >=20 >=20