From 808e9ea8dd3dc3d631a7982fa0c4b01547cb811a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 27 May 2008 14:12:45 +0200 Subject: [PATCH] smalloc: fix compile error Signed-off-by: Jens Axboe --- smalloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/smalloc.c b/smalloc.c index 3b512bcf..3d3986b8 100644 --- a/smalloc.c +++ b/smalloc.c @@ -95,6 +95,11 @@ static inline int ptr_valid(struct pool *pool, void *ptr) return (ptr >= pool->map) && (ptr < pool->map + pool_size); } +static inline unsigned int size_to_blocks(unsigned int size) +{ + return (size + SMALLOC_BPB - 1) / SMALLOC_BPB; +} + static int blocks_iter(unsigned int *map, unsigned int idx, unsigned int nr_blocks, int (*func)(unsigned int *map, unsigned int mask)) @@ -367,11 +372,6 @@ void sfree(void *ptr) sfree_pool(pool, ptr); } -static inline unsigned int size_to_blocks(unsigned int size) -{ - return (size + SMALLOC_BPB - 1) / SMALLOC_BPB; -} - static void *__smalloc_pool(struct pool *pool, unsigned int size) { unsigned int nr_blocks; -- 2.25.1