X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fbsdapp%2Fcontigmem%2Fcontigmem.c;h=c6ca3b9ca272524c0ab57f1802f437ed665a12b3;hb=6307b909b8e01af6737734cde4ff8b782b6efdf3;hp=8ac836d9434ec2b2c57d6c75686ed2fdd787d9fd;hpb=340a1edfa95e008f31d6d7bffd05bd959c6b75c3;p=dpdk.git diff --git a/lib/librte_eal/bsdapp/contigmem/contigmem.c b/lib/librte_eal/bsdapp/contigmem/contigmem.c index 8ac836d943..c6ca3b9ca2 100644 --- 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; } - return (error); + return error; } 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); - 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); - return (EINVAL); + return EINVAL; } 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); - return (ENOMEM); + return ENOMEM; } 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"); - return (0); + return 0; } static int @@ -183,7 +183,7 @@ contigmem_unload() contigfree(contigmem_buffers[i], contigmem_buffer_size, M_CONTIGMEM); - return (0); + return 0; } static int @@ -193,14 +193,14 @@ contigmem_physaddr(SYSCTL_HANDLER_ARGS) 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) { - return (0); + return 0; } static int @@ -209,7 +209,7 @@ contigmem_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr, { *paddr = offset; - return (0); + return 0; } 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) - 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); - return (0); + return 0; }