git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: remove extra parenthesis after return
[dpdk.git]
/
lib
/
librte_eal
/
bsdapp
/
eal
/
eal_pci.c
diff --git
a/lib/librte_eal/bsdapp/eal/eal_pci.c
b/lib/librte_eal/bsdapp/eal/eal_pci.c
index
30f0232
..
2df5c1c
100644
(file)
--- a/
lib/librte_eal/bsdapp/eal/eal_pci.c
+++ b/
lib/librte_eal/bsdapp/eal/eal_pci.c
@@
-179,10
+179,10
@@
pci_uio_map_secondary(struct rte_pci_device *dev)
!= uio_res->maps[i].addr) {
RTE_LOG(ERR, EAL,
"Cannot mmap device resource\n");
!= 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");
}
RTE_LOG(ERR, EAL, "Cannot find resource for device\n");
@@
-209,7
+209,7
@@
pci_uio_map_resource(struct rte_pci_device *dev)
/* secondary processes - use already recorded details */
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
/* 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);
snprintf(devname, sizeof(devname), "/dev/uio@pci:%u:%u:%u",
dev->addr.bus, dev->addr.devid, dev->addr.function);
@@
-233,7
+233,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__);
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);
}
snprintf(uio_res->path, sizeof(uio_res->path), "%s", devname);
@@
-261,7
+261,7
@@
pci_uio_map_resource(struct rte_pci_device *dev)
(size_t)maps[j].size)
) == NULL) {
rte_free(uio_res);
(size_t)maps[j].size)
) == NULL) {
rte_free(uio_res);
- return
(-1)
;
+ return
-1
;
}
maps[j].addr = mapaddr;
}
maps[j].addr = mapaddr;
@@
-271,7
+271,7
@@
pci_uio_map_resource(struct rte_pci_device *dev)
TAILQ_INSERT_TAIL(uio_res_list, uio_res, next);
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. */
}
/* Scan one pci sysfs entry, and fill the devices list from it. */
@@
-432,7
+432,7
@@
error:
int
rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev)
{
int
rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev)
{
- struct rte_pci_id *id_table;
+
const
struct rte_pci_id *id_table;
int ret;
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {
int ret;
for (id_table = dr->id_table ; id_table->vendor_id != 0; id_table++) {