From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v9 06/25] eal: introduce init macros Date: Thu, 15 Sep 2016 12:58:28 +0530 Message-ID: References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1473257297-7221-1-git-send-email-shreyansh.jain@nxp.com> <1473257297-7221-7-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , To: David Marchand Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id 876525681 for ; Thu, 15 Sep 2016 09:28:04 +0200 (CEST) In-Reply-To: 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" On Monday 12 September 2016 12:45 PM, David Marchand wrote: > On Wed, Sep 7, 2016 at 4:07 PM, Shreyansh Jain wrote: >> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h >> index fa74962..cf673e4 100644 >> --- a/lib/librte_eal/common/include/rte_pci.h >> +++ b/lib/librte_eal/common/include/rte_pci.h >> @@ -470,6 +470,16 @@ void rte_eal_pci_dump(FILE *f); >> */ >> void rte_eal_pci_register(struct rte_pci_driver *driver); >> >> +/** Helper for PCI device registeration from driver (eth, crypto) instance */ > > Typo: registration Ok - I will fix this. > >> +#define DRIVER_REGISTER_PCI(nm, pci_drv) \ >> +RTE_INIT(pciinitfn_ ##nm); \ >> +static void pciinitfn_ ##nm(void) \ >> +{ \ >> + (pci_drv).name = RTE_STR(nm);\ >> + rte_eal_pci_register(&pci_drv); \ >> +}\ >> +DRIVER_EXPORT_NAME(nm, __COUNTER__) > > Checkpatch complains about a missing space. Yes, '} \' is expected. somehow missed my merges though checkpatch did complain. Will fix this. > > -- - Shreyansh