From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] drivers: prefix driver REGISTER macro with RTE PMD Date: Sun, 09 Oct 2016 21:50:56 +0200 Message-ID: <4525292.xovB97rfbE@xps13> References: <1475949668-26829-1-git-send-email-shreyansh.jain@nxp.com> <184506162.Hjg7Xy8FWv@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: "david.marchand@6wind.com" , dev@dpdk.org, "nhorman@tuxdriver.com" To: Shreyansh Jain Return-path: Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by dpdk.org (Postfix) with ESMTP id BA5465398 for ; Sun, 9 Oct 2016 21:50:58 +0200 (CEST) Received: by mail-lf0-f50.google.com with SMTP id b81so88878917lfe.1 for ; Sun, 09 Oct 2016 12:50:58 -0700 (PDT) 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" 2016-10-09 15:12, Shreyansh Jain: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2016-10-08 23:35, Shreyansh Jain: > > > +PMDINFO_TO_O = if grep -E 'RTE_PMD_REGISTER_PCI\([0-9a-zA-Z,_\. > > ]+\)|RTE_PMD_REGISTER_VDEV\([0-9a-zA-Z,_\. ]+\)' $<;\ > > > + then \ > > > > I don't understand why you don't simply grep 'RTE_PMD_REGISTER_.*(' ? > > Because I want to make sure that the grep matches only the DRIVER registration functions. > In case a new macro (or driver type) is added in future, this macro can be updated. This way we can reduce the probability of a faulty match. > > Is there a problem with closest possible match? It is just long and useless. A macro starting with RTE_PMD_REGISTER_ must be called from a PMD. What else?