From: David Marchand Date: Tue, 15 Mar 2016 06:29:12 +0000 (+0100) Subject: pci: align ioport special case for x86 in read/write/unmap X-Git-Tag: spdx-start~7258 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ce8221f37ec49434d9249a4ca25409ac4d114f7;p=dpdk.git pci: align ioport special case for x86 in read/write/unmap Commit b8eb345378bd ("pci: ignore devices already managed in Linux when mapping x86 ioport") did not update other parts of the ioport api. The application is not supposed to call these read/write/unmap ioport functions if map call failed but I prefer aligning the code for the sake of consistency. Signed-off-by: David Marchand --- diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 77d70d9eb7..5101851a4b 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -649,12 +649,13 @@ rte_eal_pci_ioport_read(struct rte_pci_ioport *p, case RTE_KDRV_UIO_GENERIC: pci_uio_ioport_read(p, data, len, offset); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... */ pci_uio_ioport_read(p, data, len, offset); #endif break; + default: + break; } } @@ -672,12 +673,13 @@ rte_eal_pci_ioport_write(struct rte_pci_ioport *p, case RTE_KDRV_UIO_GENERIC: pci_uio_ioport_write(p, data, len, offset); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... */ pci_uio_ioport_write(p, data, len, offset); #endif break; + default: + break; } } @@ -697,12 +699,13 @@ rte_eal_pci_ioport_unmap(struct rte_pci_ioport *p) case RTE_KDRV_UIO_GENERIC: ret = pci_uio_ioport_unmap(p); break; - default: + case RTE_KDRV_NONE: #if defined(RTE_ARCH_X86) - /* special case for x86 ... nothing to do */ ret = 0; #endif break; + default: + break; } return ret;