From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f175.google.com (mail-ig0-f175.google.com [209.85.213.175]) by dpdk.org (Postfix) with ESMTP id 83A9CC32A for ; Tue, 19 May 2015 16:51:41 +0200 (CEST) Received: by igbpi8 with SMTP id pi8so108229749igb.0 for ; Tue, 19 May 2015 07:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4D0/kCGwXamw61u5x7901h4jsRoLARiaTSpt1GxwpUk=; b=K7MP1BTfx2xhxOnryMw4n3KJ0+tAypWakMXgksTsC8QRDXrGc29JdV1i80uv2qBZ/j 8XHhFRq2pLe5bbWxH/9/WEdvTNUvpC6geG5lF+itYoOKt/n9kmNhwZqhPI9TXbKBdjLV fLS7/VeA5u61pbKwrZuhLxtRXWBUjlGbxpB6hklen6o0l8KUS5kdKM4s8EGfQNmNevM2 oYMYLsmWzCc8G/RZCEkiMIpj5W6m8yY6QixyvuL5rEb659PiZKJyu7M8xsaYcnDbDTSx qkTrPtx22Qf+QCFC4V+iWcjiNASiuStwmBHTDVmcNKadl74xA85hy75MUGvSNRDjh2cP fpkg== X-Gm-Message-State: ALoCoQkpG4dtsGdpGR1i6QXRopR+XCV1G3D+eK89H2WeAXV5HItGt2p7LewdPsvNSiTcxowRQkeX MIME-Version: 1.0 X-Received: by 10.107.29.148 with SMTP id d142mr37807513iod.9.1432047100943; Tue, 19 May 2015 07:51:40 -0700 (PDT) Received: by 10.64.58.227 with HTTP; Tue, 19 May 2015 07:51:40 -0700 (PDT) In-Reply-To: <1432014898-3543-2-git-send-email-mukawa@igel.co.jp> References: <1432014898-3543-1-git-send-email-mukawa@igel.co.jp> <1432014898-3543-2-git-send-email-mukawa@igel.co.jp> Date: Tue, 19 May 2015 07:51:40 -0700 Message-ID: From: Stephen Hemminger To: Tetsuya Mukawa Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4 1/5] eal: Fix coding style of eal_pci.c and eal_pci_uio.c 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, 19 May 2015 14:51:42 -0000 Acked-by: Stephen Hemminger On Mon, May 18, 2015 at 10:54 PM, Tetsuya Mukawa wrote: > This patch fixes coding style of below files in linuxapp and bsdapp. > - eal_pci.c > - eal_pci_uio.c > > Signed-off-by: Tetsuya Mukawa > --- > lib/librte_eal/bsdapp/eal/eal_pci.c | 24 +++++++++++++----------- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 12 ++++++++---- > 2 files changed, 21 insertions(+), 15 deletions(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c > b/lib/librte_eal/bsdapp/eal/eal_pci.c > index 61e8921..8e24fd1 100644 > --- a/lib/librte_eal/bsdapp/eal/eal_pci.c > +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c > @@ -161,9 +161,10 @@ fail: > static int > pci_uio_map_secondary(struct rte_pci_device *dev) > { > - size_t i; > - struct uio_resource *uio_res; > - struct uio_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); > + size_t i; > + struct uio_resource *uio_res; > + struct uio_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); > > TAILQ_FOREACH(uio_res, uio_res_list, next) { > > @@ -179,10 +180,10 @@ pci_uio_map_secondary(struct rte_pci_device *dev) > != uio_res->maps[i].addr) { > RTE_LOG(ERR, EAL, > "Cannot mmap device resource\n"); > - return (-1); > + return -1; > } > } > - return (0); > + return 0; > } > > RTE_LOG(ERR, EAL, "Cannot find resource for device\n"); > @@ -201,7 +202,8 @@ pci_uio_map_resource(struct rte_pci_device *dev) > uint64_t pagesz; > struct rte_pci_addr *loc = &dev->addr; > struct uio_resource *uio_res; > - struct uio_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); > + struct uio_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, uio_res_list); > struct uio_map *maps; > > dev->intr_handle.fd = -1; > @@ -209,7 +211,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); > > snprintf(devname, sizeof(devname), "/dev/uio@pci:%u:%u:%u", > dev->addr.bus, dev->addr.devid, > dev->addr.function); > @@ -233,7 +235,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) > 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; > } > > snprintf(uio_res->path, sizeof(uio_res->path), "%s", devname); > @@ -261,7 +263,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) > (size_t)maps[j].size) > ) == NULL) { > rte_free(uio_res); > - return (-1); > + return -1; > } > > maps[j].addr = mapaddr; > @@ -271,7 +273,7 @@ pci_uio_map_resource(struct rte_pci_device *dev) > > TAILQ_INSERT_TAIL(uio_res_list, uio_res, next); > > - return (0); > + return 0; > } > > /* Scan one pci sysfs entry, and fill the devices list from it. */ > @@ -311,7 +313,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) > /* FreeBSD has no NUMA support (yet) */ > dev->numa_node = 0; > > -/* parse resources */ > + /* parse resources */ > switch (conf->pc_hdr & PCIM_HDRTYPE) { > case PCIM_HDRTYPE_NORMAL: > max = PCIR_MAX_BAR_0; > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index b5116a7..5d3354d 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > @@ -92,7 +92,8 @@ pci_uio_map_secondary(struct rte_pci_device *dev) > { > int fd, i; > struct mapped_pci_resource *uio_res; > - struct mapped_pci_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); > + struct mapped_pci_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, > mapped_pci_res_list); > > TAILQ_FOREACH(uio_res, uio_res_list, next) { > > @@ -272,7 +273,8 @@ pci_uio_map_resource(struct rte_pci_device *dev) > uint64_t phaddr; > struct rte_pci_addr *loc = &dev->addr; > struct mapped_pci_resource *uio_res; > - struct mapped_pci_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); > + struct mapped_pci_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, > mapped_pci_res_list); > struct pci_map *maps; > > dev->intr_handle.fd = -1; > @@ -417,7 +419,8 @@ static struct mapped_pci_resource * > pci_uio_find_resource(struct rte_pci_device *dev) > { > struct mapped_pci_resource *uio_res; > - struct mapped_pci_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); > + struct mapped_pci_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, > mapped_pci_res_list); > > if (dev == NULL) > return NULL; > @@ -436,7 +439,8 @@ void > pci_uio_unmap_resource(struct rte_pci_device *dev) > { > struct mapped_pci_resource *uio_res; > - struct mapped_pci_res_list *uio_res_list = > RTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list); > + struct mapped_pci_res_list *uio_res_list = > + RTE_TAILQ_CAST(rte_uio_tailq.head, > mapped_pci_res_list); > > if (dev == NULL) > return; > -- > 2.1.4 > >