mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[PATCH] mempool: use mempool_create_slab_pool()
Modify well over a dozen mempool users to call mempool_create_slab_pool() rather than calling mempool_create() with extra arguments, saving about 30 lines of code and increasing readability. Signed-off-by: Matthew Dobson <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fec433aaaa
commit
93d2341c75
19 changed files with 39 additions and 72 deletions
|
|
@ -1167,16 +1167,12 @@ rpc_init_mempool(void)
|
|||
NULL, NULL);
|
||||
if (!rpc_buffer_slabp)
|
||||
goto err_nomem;
|
||||
rpc_task_mempool = mempool_create(RPC_TASK_POOLSIZE,
|
||||
mempool_alloc_slab,
|
||||
mempool_free_slab,
|
||||
rpc_task_slabp);
|
||||
rpc_task_mempool = mempool_create_slab_pool(RPC_TASK_POOLSIZE,
|
||||
rpc_task_slabp);
|
||||
if (!rpc_task_mempool)
|
||||
goto err_nomem;
|
||||
rpc_buffer_mempool = mempool_create(RPC_BUFFER_POOLSIZE,
|
||||
mempool_alloc_slab,
|
||||
mempool_free_slab,
|
||||
rpc_buffer_slabp);
|
||||
rpc_buffer_mempool = mempool_create_slab_pool(RPC_BUFFER_POOLSIZE,
|
||||
rpc_buffer_slabp);
|
||||
if (!rpc_buffer_mempool)
|
||||
goto err_nomem;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue