diff options
author | Dave Barach <dave@barachs.net> | 2016-08-15 11:12:27 -0400 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2016-08-15 11:12:40 -0400 |
commit | c379999665febd12ec55bfb3a7545224f2b39d3d (patch) | |
tree | 8bf0c11e52c2162e1239b6c3f4a5f74b62a07409 /svm | |
parent | b3d93dacfde8ab21bbce171fff2971b2ed7bce6a (diff) |
VPP-327 Coding standards cleanup for vppinfra
Fix additional a few additional deviations reported elsewhere by
checkstyle
Change-Id: I026a8ae1c5b1856bbe3c4a555e1b690e7501b045
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'svm')
-rw-r--r-- | svm/svm.c | 34 | ||||
-rw-r--r-- | svm/svm.h | 2 | ||||
-rw-r--r-- | svm/svmtool.c | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/svm/svm.c b/svm/svm.c index 851baea55ed..e4ca98e1ed2 100644 --- a/svm/svm.c +++ b/svm/svm.c @@ -235,9 +235,9 @@ svm_data_region_create (svm_map_region_args_t * a, svm_region_t * rp) u8 junk = 0; uword map_size; - map_size = rp->virtual_size - (MMAP_PAGESIZE + - (a->pvt_heap_size ? a->pvt_heap_size : - SVM_PVT_MHEAP_SIZE)); + map_size = rp->virtual_size - (MMAP_PAGESIZE + + (a->pvt_heap_size ? a->pvt_heap_size : + SVM_PVT_MHEAP_SIZE)); if (a->flags & SVM_FLAGS_FILE) { @@ -318,8 +318,8 @@ svm_data_region_map (svm_map_region_args_t * a, svm_region_t * rp) uword map_size; struct stat statb; - map_size = rp->virtual_size - - (MMAP_PAGESIZE + map_size = rp->virtual_size - + (MMAP_PAGESIZE + (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE)); if (a->flags & SVM_FLAGS_FILE) @@ -368,9 +368,9 @@ svm_data_region_map (svm_map_region_args_t * a, svm_region_t * rp) } ASSERT (map_size <= rp->virtual_size - - (MMAP_PAGESIZE - + - (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE))); + - (MMAP_PAGESIZE + + + (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE))); if (mmap (rp->data_base, map_size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, 0) == MAP_FAILED) @@ -534,9 +534,9 @@ svm_map_region (svm_map_region_args_t * a) rp->region_heap = mheap_alloc_with_flags ((void *) (a->baseva + MMAP_PAGESIZE), - (a->pvt_heap_size != 0) ? - a->pvt_heap_size : SVM_PVT_MHEAP_SIZE, - MHEAP_FLAG_DISABLE_VM); + (a->pvt_heap_size != 0) ? + a->pvt_heap_size : SVM_PVT_MHEAP_SIZE, + MHEAP_FLAG_DISABLE_VM); oldheap = svm_push_pvt_heap (rp); rp->region_name = (char *) format (0, "%s%c", a->name, 0); @@ -550,7 +550,7 @@ svm_map_region (svm_map_region_args_t * a) vec_validate (rp->bitmap, words - 1); overhead_space = MMAP_PAGESIZE /* header */ + - ((a->pvt_heap_size != 0)? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE); + ((a->pvt_heap_size != 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE); bit = 0; data_base = (uword) rp->virtual_base; @@ -782,7 +782,7 @@ void svm_region_init (void) { svm_map_region_args_t _a, *a = &_a; - + memset (a, 0, sizeof (*a)); a->root_path = 0; a->name = SVM_GLOBAL_REGION_NAME; @@ -799,7 +799,7 @@ void svm_region_init_chroot (char *root_path) { svm_map_region_args_t _a, *a = &_a; - + memset (a, 0, sizeof (*a)); a->root_path = root_path; a->name = SVM_GLOBAL_REGION_NAME; @@ -816,7 +816,7 @@ void svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid) { svm_map_region_args_t _a, *a = &_a; - + memset (a, 0, sizeof (*a)); a->root_path = root_path; a->name = SVM_GLOBAL_REGION_NAME; @@ -849,7 +849,7 @@ svm_region_find_or_create (svm_map_region_args_t * a) ASSERT (root_rp); - a->size += MMAP_PAGESIZE + + a->size += MMAP_PAGESIZE + ((a->pvt_heap_size != 0) ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE); a->size = rnd_pagesize (a->size); @@ -932,7 +932,7 @@ svm_region_find_or_create (svm_map_region_args_t * a) a->baseva = root_rp->virtual_base + index * MMAP_PAGESIZE; rp = svm_map_region (a); - + pool_get (mp->subregions, subp); name = format (0, "%s%c", a->name, 0); subp->subregion_name = name; diff --git a/svm/svm.h b/svm/svm.h index c42d2b578df..5b95abb66ba 100644 --- a/svm/svm.h +++ b/svm/svm.h @@ -117,7 +117,7 @@ void *svm_region_find_or_create (svm_map_region_args_t * a); void svm_region_init (void); void svm_region_init_chroot (char *root_path); void svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid); -void svm_region_init_args (svm_map_region_args_t *a); +void svm_region_init_args (svm_map_region_args_t * a); void svm_region_exit (void); void svm_region_unmap (void *rp_arg); void svm_client_scan (char *root_path); diff --git a/svm/svmtool.c b/svm/svmtool.c index 2e55a0873e3..b319551425c 100644 --- a/svm/svmtool.c +++ b/svm/svmtool.c @@ -247,7 +247,7 @@ svm_existing_region_map_nolock (void *root_arg, svm_map_region_args_t * a) void *oldheap; uword *p; - a->size += MMAP_PAGESIZE + + a->size += MMAP_PAGESIZE + (a->pvt_heap_size ? a->pvt_heap_size : SVM_PVT_MHEAP_SIZE); a->size = rnd_pagesize (a->size); |