[dpdk-dev,4/7] virtio: fix build with debug enabled

Message ID 1425396230-13379-5-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Thomas Monjalon March 3, 2015, 3:23 p.m. UTC
  With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:
	error: ‘devname’ undeclared (first use in this function)

Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ouyang Changchun March 4, 2015, 1:17 a.m. UTC | #1
> -----Original Message-----

> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon

> Sent: Tuesday, March 3, 2015 11:24 PM

> To: dev@dpdk.org

> Subject: [dpdk-dev] [PATCH 4/7] virtio: fix build with debug enabled

> 

> With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:

> 	error: ‘devname’ undeclared (first use in this function)

> 

> Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")

> 

> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>


Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
  

Patch

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 4bad1e4..d239083 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -971,7 +971,7 @@  static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)
 	pci_dev->intr_handle.fd = open(dirname, O_RDWR);
 	if (pci_dev->intr_handle.fd < 0) {
 		PMD_INIT_LOG(ERR, "Cannot open %s: %s\n",
-			devname, strerror(errno));
+			dirname, strerror(errno));
 		return -1;
 	}