From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id ED1F8B0A9 for ; Wed, 28 May 2014 16:38:33 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 28 May 2014 07:33:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,928,1392192000"; d="scan'208";a="547817100" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 28 May 2014 07:38:31 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s4SEcUiB017284; Wed, 28 May 2014 15:38:31 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s4SEcUFt008726; Wed, 28 May 2014 15:38:30 +0100 Received: (from aburakov@localhost) by sivswdev02.ir.intel.com with id s4SEcUiN008722; Wed, 28 May 2014 15:38:30 +0100 From: Anatoly Burakov To: dev@dpdk.org Date: Wed, 28 May 2014 15:38:00 +0100 Message-Id: <4de56e5dc46a3ee34242cc6fd9ed01cd6064240a.1401287651.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1400514709-24087-1-git-send-email-anatoly.burakov@intel.com> References: <1400514709-24087-1-git-send-email-anatoly.burakov@intel.com> In-Reply-To: References: Subject: [dpdk-dev] [PATCH v3 03/20] pci: fixing errors in a previous commit found by checkpatch X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 14:38:34 -0000 Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index 61f09cc..ae4e716 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -69,7 +69,7 @@ pci_uio_get_mappings(const char *devname, struct pci_map maps[], int nb_maps) { if (pci_parse_sysfs_value(filename, &offset) < 0) { RTE_LOG(ERR, EAL, "%s(): cannot parse offset of %s\n", __func__, dirname); - return (-1); + return -1; } /* get mapping size */ @@ -77,7 +77,7 @@ pci_uio_get_mappings(const char *devname, struct pci_map maps[], int nb_maps) { if (pci_parse_sysfs_value(filename, &size) < 0) { RTE_LOG(ERR, EAL, "%s(): cannot parse size of %s\n", __func__, dirname); - return (-1); + return -1; } /* get mapping physical address */ @@ -85,20 +85,20 @@ pci_uio_get_mappings(const char *devname, struct pci_map maps[], int nb_maps) { if (pci_parse_sysfs_value(filename, &maps[i].phaddr) < 0) { RTE_LOG(ERR, EAL, "%s(): cannot parse addr of %s\n", __func__, dirname); - return (-1); + return -1; } if ((offset > OFF_MAX) || (size > SIZE_MAX)) { RTE_LOG(ERR, EAL, "%s(): offset/size exceed system max value\n", __func__); - return (-1); + return -1; } maps[i].offset = offset; maps[i].size = size; } - return (i); + return i; } static int @@ -128,12 +128,12 @@ pci_uio_map_secondary(struct rte_pci_device *dev) { (size_t) uio_res->maps[i].size) != uio_res->maps[i].addr) { RTE_LOG(ERR, EAL, "Cannot mmap device resource\n"); close(fd); - return (-1); + return -1; } /* fd is not needed in slave process, close it */ close(fd); } - return (0); + return 0; } RTE_LOG(ERR, EAL, "Cannot find resource for device\n"); @@ -277,7 +277,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) { /* secondary processes - use already recorded details */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) - return (pci_uio_map_secondary(dev)); + return pci_uio_map_secondary(dev); /* find uio resource */ uio_num = pci_get_uio_dev(dev, dirname, sizeof(dirname)); @@ -299,7 +299,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) { /* allocate the mapping details for secondary processes*/ if ((uio_res = rte_zmalloc("UIO_RES", sizeof(*uio_res), 0)) == NULL) { RTE_LOG(ERR, EAL, "%s(): cannot store uio mmap details\n", __func__); - return (-1); + return -1; } rte_snprintf(uio_res->path, sizeof(uio_res->path), "%s", devname); @@ -310,7 +310,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) { RTE_DIM(uio_res->maps)); if (nb_maps < 0) { rte_free(uio_res); - return (nb_maps); + return nb_maps; } uio_res->nb_maps = nb_maps; -- 1.8.1.4