From patchwork Thu Jan 7 16:33:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Santosh Shukla X-Patchwork-Id: 9776 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 43177BE80; Thu, 7 Jan 2016 17:34:48 +0100 (CET) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by dpdk.org (Postfix) with ESMTP id 911D6C31C for ; Thu, 7 Jan 2016 17:34:46 +0100 (CET) Received: by mail-pa0-f46.google.com with SMTP id ho8so1678306pac.2 for ; Thu, 07 Jan 2016 08:34:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mvista-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=MEhsHOVi9fswbiCwmvYcFF+69SpcAGJCS6NE+PsLsCE=; b=z/5Lzd5j2f1Jrxrylui+5ZX8vt2Se2OPFkBjHB8eOjLZAGXqKKf5zlOcPSTB/QQTU1 qnt3XhUYHoUXRyAYQi4ypfN7Sn69BNnXLA8dI9gDWKEjd/FcmlHT4gA4HWdCP6JaI34l Cdi3CSl8vWdhcAa9LG8Hp0y/bXVKM5AmDhbbq5sMJ+Za9h+661xD3fuXnI/sE7eUMKPU Oaks2+QIVwM4AnvjYaYWugKyhYG95+cyCO8XQEPlMvFAGXecn4uVycE6yRfOUoHH4wlV OhmzCl46rwMQLp9LzMTeaYtivvVTiUVPG5QGTOarrIXp/P2QsfK3reYV/Gq4pMfUTbwu OCMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=MEhsHOVi9fswbiCwmvYcFF+69SpcAGJCS6NE+PsLsCE=; b=OO0TKmKpLoT922wdJ95o4u7RLfvXo4wyImA+VSwyUrmkiJkVLsRpjcFp+fABBJA3+E Xprfvr49/kGAyooJZKoR+Ram+bIykO4ZAUBIksy2ROj0hm6MCvrwEUJ/l2iaheHHnZyg Ve0COtM66rnfDiFG4JaHr+SRkrHKMQBjsOCs+XJSbBpm2xfLePxeU1VXCEvv31Q1sBPV 3PVE9gi755P+O0TE2DFNmNn/dsnF1qLBhUgMhWbnhuF62S0zMcqZct/Bs5swI7VEEpZM cM5iVeb8b1LXfJYKU2VMBKRg+U5y+RdJt3I5N2abXDMd59DV1YaoNU+pMOzfQkBIj+PI gk1w== X-Gm-Message-State: ALoCoQmp18Do4TZbX8ilmnlg2EfJbiDqRVSRAxeGNSqu4QdJv4MSrqywA60GKA/tY7/cWvzF1ySPM+OSjBobOkJEzzxNOs0TqA== X-Received: by 10.66.221.42 with SMTP id qb10mr151613007pac.51.1452184486014; Thu, 07 Jan 2016 08:34:46 -0800 (PST) Received: from santosh-Latitude-E5530-non-vPro.mvista.com ([111.93.218.67]) by smtp.gmail.com with ESMTPSA id yn8sm159454163pac.32.2016.01.07.08.34.42 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 08:34:45 -0800 (PST) From: Santosh Shukla To: dev@dpdk.org Date: Thu, 7 Jan 2016 22:03:09 +0530 Message-Id: <1452184390-5994-13-git-send-email-sshukla@mvista.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1452184390-5994-1-git-send-email-sshukla@mvista.com> References: <1452184390-5994-1-git-send-email-sshukla@mvista.com> MIME-Version: 1.0 Cc: Rizwan Ansari Subject: [dpdk-dev] [PATCH v3 12/12] eal: pci: vfio: fix build error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Rizwan Ansari Patch fixes below build error: /home/mv/work/thunder/santosh/dpdk/santosh/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c: In function ‘pci_vfio_set_iommu_type’: /home/mv/work/thunder/santosh/dpdk/santosh/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c:243:2: error: ‘for’ loop initial declarations are only allowed in C99 mode for (unsigned idx = 0; idx < RTE_DIM(iommu_types); idx++) { ^ /home/mv/work/thunder/santosh/dpdk/santosh/dpdk/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c:243:2: note: use option -std=c99 or -std=gnu99 to compile your code Signed-off-by: Rizwan Ansari Signed-off-by: Santosh Shukla --- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c index c69050d..844ef80 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c @@ -240,7 +240,8 @@ pci_vfio_set_bus_master(int dev_fd) /* pick IOMMU type. returns a pointer to vfio_iommu_type or NULL for error */ static const struct vfio_iommu_type * pci_vfio_set_iommu_type(int vfio_container_fd) { - for (unsigned idx = 0; idx < RTE_DIM(iommu_types); idx++) { + unsigned idx; + for (idx = 0; idx < RTE_DIM(iommu_types); idx++) { const struct vfio_iommu_type *t = &iommu_types[idx]; int ret = ioctl(vfio_container_fd, VFIO_SET_IOMMU,