malloc: fix style in free list index computation
Cleanup code style issue reported by kernel checkpatch. As follows: * ERROR:CODE_INDENT: code indent should use tabs where possible * ERROR:SPACING: spaces required around that '?' (ctx:VxE) * WARNING:INDENTED_LABEL: labels should not be indented Fixes: b0489e7bca2f ("malloc: fix linear complexity") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
5882bde88d
commit
a99d2521a3
@ -391,14 +391,14 @@ malloc_elem_free_list_index(size_t size)
|
||||
return 0;
|
||||
|
||||
/* Find next power of 2 >= size. */
|
||||
log2 = sizeof(size) * 8 - __builtin_clzl(size-1);
|
||||
log2 = sizeof(size) * 8 - __builtin_clzl(size - 1);
|
||||
|
||||
/* Compute freelist index, based on log2(size). */
|
||||
index = (log2 - MALLOC_MINSIZE_LOG2 + MALLOC_LOG2_INCREMENT - 1) /
|
||||
MALLOC_LOG2_INCREMENT;
|
||||
MALLOC_LOG2_INCREMENT;
|
||||
|
||||
return index <= RTE_HEAP_NUM_FREELISTS-1?
|
||||
index: RTE_HEAP_NUM_FREELISTS-1;
|
||||
return index <= RTE_HEAP_NUM_FREELISTS - 1 ?
|
||||
index : RTE_HEAP_NUM_FREELISTS - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user