From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH] bus: fix driver registration Date: Wed, 5 Jul 2017 11:17:44 +0530 Message-ID: <8c51e4de-f740-b519-f920-a8a359ca5e0d@nxp.com> References: <20170704214313.31828-1-thomas@monjalon.net> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: To: Thomas Monjalon , Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0044.outbound.protection.outlook.com [104.47.38.44]) by dpdk.org (Postfix) with ESMTP id 4FFA82B96 for ; Wed, 5 Jul 2017 07:38:40 +0200 (CEST) In-Reply-To: <20170704214313.31828-1-thomas@monjalon.net> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wednesday 05 July 2017 03:13 AM, Thomas Monjalon wrote: > The bus name was stored with embedded double quotes. > Indeed the bus name is given with a string in a macro, > which is not used elsewhere. > These macros are useless because the buses are drivers, > so they must not have any API for the application writer. > The registration can be done with a hardcoded value without quotes. > > There is another (small) benefit of not using macros for driver names: > it is to have a meaningful constructor function name. > For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci. > > The bus registration macro is also changed to use > the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers. > The priority is the highest (101) in order to be sure that the bus driver > is registered before its device drivers. > > Fixes: 0fd1a0eaae19 ("pci: add bus driver") > Fixes: fea892e35f21 ("bus/vdev: use standard bus registration") > Fixes: 7e7df6d0a41d ("bus/fslmc: introduce fsl-mc bus driver") > > Signed-off-by: Thomas Monjalon > --- > This patch is a proposal to replace the patch > "bus: fix bus name registration" in the series "rte_bus parse API". > --- > drivers/bus/fslmc/fslmc_bus.c | 2 +- > drivers/bus/fslmc/rte_fslmc.h | 3 --- > lib/librte_eal/common/eal_common_pci.c | 2 +- > lib/librte_eal/common/eal_common_vdev.c | 2 +- > lib/librte_eal/common/include/rte_bus.h | 3 ++- > lib/librte_eal/common/include/rte_eal.h | 3 +++ > lib/librte_eal/common/include/rte_pci.h | 3 --- > lib/librte_eal/common/include/rte_vdev.h | 2 -- > 8 files changed, 8 insertions(+), 12 deletions(-) > For DPAA2 as well as generic change: Acked-by: Shreyansh Jain