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
/
contigmem
/
contigmem.c
diff --git
a/lib/librte_eal/bsdapp/contigmem/contigmem.c
b/lib/librte_eal/bsdapp/contigmem/contigmem.c
index
8ac836d
..
c6ca3b9
100644
(file)
--- a/
lib/librte_eal/bsdapp/contigmem/contigmem.c
+++ b/
lib/librte_eal/bsdapp/contigmem/contigmem.c
@@
-99,7
+99,7
@@
static int contigmem_modevent(module_t mod, int type, void *arg)
break;
}
break;
}
- return
(error)
;
+ return
error
;
}
moduledata_t contigmem_mod = {
}
moduledata_t contigmem_mod = {
@@
-128,14
+128,14
@@
contigmem_load()
if (contigmem_num_buffers > RTE_CONTIGMEM_MAX_NUM_BUFS) {
printf("%d buffers requested is greater than %d allowed\n",
contigmem_num_buffers, RTE_CONTIGMEM_MAX_NUM_BUFS);
if (contigmem_num_buffers > RTE_CONTIGMEM_MAX_NUM_BUFS) {
printf("%d buffers requested is greater than %d allowed\n",
contigmem_num_buffers, RTE_CONTIGMEM_MAX_NUM_BUFS);
- return
(EINVAL)
;
+ return
EINVAL
;
}
if (contigmem_buffer_size < PAGE_SIZE ||
(contigmem_buffer_size & (contigmem_buffer_size - 1)) != 0) {
printf("buffer size 0x%lx is not greater than PAGE_SIZE and "
"power of two\n", contigmem_buffer_size);
}
if (contigmem_buffer_size < PAGE_SIZE ||
(contigmem_buffer_size & (contigmem_buffer_size - 1)) != 0) {
printf("buffer size 0x%lx is not greater than PAGE_SIZE and "
"power of two\n", contigmem_buffer_size);
- return
(EINVAL)
;
+ return
EINVAL
;
}
for (i = 0; i < contigmem_num_buffers; i++) {
}
for (i = 0; i < contigmem_num_buffers; i++) {
@@
-145,7
+145,7
@@
contigmem_load()
if (contigmem_buffers[i] == NULL) {
printf("contigmalloc failed for buffer %d\n", i);
if (contigmem_buffers[i] == NULL) {
printf("contigmalloc failed for buffer %d\n", i);
- return
(ENOMEM)
;
+ return
ENOMEM
;
}
printf("%2u: virt=%p phys=%p\n", i, contigmem_buffers[i],
}
printf("%2u: virt=%p phys=%p\n", i, contigmem_buffers[i],
@@
-164,7
+164,7
@@
contigmem_load()
contigmem_cdev = make_dev_credf(0, &contigmem_ops, 0, NULL, UID_ROOT,
GID_WHEEL, 0600, "contigmem");
contigmem_cdev = make_dev_credf(0, &contigmem_ops, 0, NULL, UID_ROOT,
GID_WHEEL, 0600, "contigmem");
- return
(0)
;
+ return
0
;
}
static int
}
static int
@@
-183,7
+183,7
@@
contigmem_unload()
contigfree(contigmem_buffers[i], contigmem_buffer_size,
M_CONTIGMEM);
contigfree(contigmem_buffers[i], contigmem_buffer_size,
M_CONTIGMEM);
- return
(0)
;
+ return
0
;
}
static int
}
static int
@@
-193,14
+193,14
@@
contigmem_physaddr(SYSCTL_HANDLER_ARGS)
int index = (int)(uintptr_t)arg1;
physaddr = (uint64_t)vtophys(contigmem_buffers[index]);
int index = (int)(uintptr_t)arg1;
physaddr = (uint64_t)vtophys(contigmem_buffers[index]);
- return
(sysctl_handle_64(oidp, &physaddr, 0, req)
);
+ return
sysctl_handle_64(oidp, &physaddr, 0, req
);
}
static int
contigmem_open(struct cdev *cdev, int fflags, int devtype,
struct thread *td)
{
}
static int
contigmem_open(struct cdev *cdev, int fflags, int devtype,
struct thread *td)
{
- return
(0)
;
+ return
0
;
}
static int
}
static int
@@
-209,7
+209,7
@@
contigmem_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr,
{
*paddr = offset;
{
*paddr = offset;
- return
(0)
;
+ return
0
;
}
static int
}
static int
@@
-222,11
+222,11
@@
contigmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,
* app.
*/
if ((*offset/PAGE_SIZE) >= contigmem_num_buffers)
* app.
*/
if ((*offset/PAGE_SIZE) >= contigmem_num_buffers)
- return
(EINVAL)
;
+ return
EINVAL
;
*offset = (vm_ooffset_t)vtophys(contigmem_buffers[*offset/PAGE_SIZE]);
*obj = vm_pager_allocate(OBJT_DEVICE, cdev, size, nprot, *offset,
curthread->td_ucred);
*offset = (vm_ooffset_t)vtophys(contigmem_buffers[*offset/PAGE_SIZE]);
*obj = vm_pager_allocate(OBJT_DEVICE, cdev, size, nprot, *offset,
curthread->td_ucred);
- return
(0)
;
+ return
0
;
}
}