From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DB0E368BB for ; Tue, 10 Jun 2014 13:11:12 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 10 Jun 2014 04:06:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,1008,1392192000"; d="scan'208";a="545649783" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2014 04:11:24 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s5ABBN8u000685; Tue, 10 Jun 2014 12:11:23 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id s5ABBNtf011462; Tue, 10 Jun 2014 12:11:23 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with id s5ABBN0a011458; Tue, 10 Jun 2014 12:11:23 +0100 From: Anatoly Burakov To: dev@dpdk.org Date: Tue, 10 Jun 2014 12:11:05 +0100 Message-Id: X-Mailer: git-send-email 1.7.0.7 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 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: Tue, 10 Jun 2014 11:11:13 -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