From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v9 04/12] eal: remove loop over drivers in device detach Date: Wed, 18 Jan 2017 16:11:12 +0530 Message-ID: <00e9bfae-0c24-8e63-e3ef-821e0951a2a5@nxp.com> References: <1484660264-6531-1-git-send-email-shreyansh.jain@nxp.com> <1484735880-17178-1-git-send-email-shreyansh.jain@nxp.com> <1484735880-17178-5-git-send-email-shreyansh.jain@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , To: Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0068.outbound.protection.outlook.com [104.47.40.68]) by dpdk.org (Postfix) with ESMTP id D2FB0F983 for ; Wed, 18 Jan 2017 11:37:48 +0100 (CET) In-Reply-To: <1484735880-17178-5-git-send-email-shreyansh.jain@nxp.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thomas, On Wednesday 18 January 2017 04:07 PM, Shreyansh Jain wrote: > diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c > index 4f155c6..7548ab0 100644 > --- a/lib/librte_eal/common/eal_common_pci.c > +++ b/lib/librte_eal/common/eal_common_pci.c > @@ -259,15 +259,17 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, > * driver. > */ > static int > -rte_eal_pci_detach_dev(struct rte_pci_driver *dr, > - struct rte_pci_device *dev) > +rte_eal_pci_detach_dev(struct rte_pci_device *dev) > { > int ret; > struct rte_pci_addr *loc; > + struct rte_pci_driver *dr; > > - if ((dr == NULL) || (dev == NULL)) > + if ((dev == NULL)) There is a checkpatch warning here which missed my check (double paranthesis). Let me know if you want me to send v10 for this. Or, if there is anything major, I will send it along with that. > return -EINVAL; > > + dr = dev->driver; > + > ret = rte_pci_match(dr, dev); > if (ret) { - Shreyansh