[PATCH] make genpool allocator adhere to kernel-doc standards

The exported kernel interfaces of genpool allocator need to adhere to
the requirements of kernel-doc.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Dean Nelson 2006-10-02 02:17:01 -07:00 committed by Linus Torvalds
parent 322acc96d4
commit a58cbd7c24

View file

@ -14,11 +14,13 @@
#include <linux/genalloc.h> #include <linux/genalloc.h>
/* /**
* Create a new special memory pool. * gen_pool_create - create a new special memory pool
*
* @min_alloc_order: log base 2 of number of bytes each bitmap bit represents * @min_alloc_order: log base 2 of number of bytes each bitmap bit represents
* @nid: node id of the node the pool structure should be allocated on, or -1 * @nid: node id of the node the pool structure should be allocated on, or -1
*
* Create a new special memory pool that can be used to manage special purpose
* memory not managed by the regular kmalloc/kfree interface.
*/ */
struct gen_pool *gen_pool_create(int min_alloc_order, int nid) struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
{ {
@ -34,15 +36,15 @@ struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
} }
EXPORT_SYMBOL(gen_pool_create); EXPORT_SYMBOL(gen_pool_create);
/**
/* * gen_pool_add - add a new chunk of special memory to the pool
* Add a new chunk of memory to the specified pool.
*
* @pool: pool to add new memory chunk to * @pool: pool to add new memory chunk to
* @addr: starting address of memory chunk to add to pool * @addr: starting address of memory chunk to add to pool
* @size: size in bytes of the memory chunk to add to pool * @size: size in bytes of the memory chunk to add to pool
* @nid: node id of the node the chunk structure and bitmap should be * @nid: node id of the node the chunk structure and bitmap should be
* allocated on, or -1 * allocated on, or -1
*
* Add a new chunk of special memory to the specified pool.
*/ */
int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size, int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
int nid) int nid)
@ -69,11 +71,12 @@ int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
} }
EXPORT_SYMBOL(gen_pool_add); EXPORT_SYMBOL(gen_pool_add);
/**
/* * gen_pool_destroy - destroy a special memory pool
* Destroy a memory pool. Verifies that there are no outstanding allocations.
*
* @pool: pool to destroy * @pool: pool to destroy
*
* Destroy the specified special memory pool. Verifies that there are no
* outstanding allocations.
*/ */
void gen_pool_destroy(struct gen_pool *pool) void gen_pool_destroy(struct gen_pool *pool)
{ {
@ -99,13 +102,13 @@ void gen_pool_destroy(struct gen_pool *pool)
} }
EXPORT_SYMBOL(gen_pool_destroy); EXPORT_SYMBOL(gen_pool_destroy);
/**
/* * gen_pool_alloc - allocate special memory from the pool
* Allocate the requested number of bytes from the specified pool.
* Uses a first-fit algorithm.
*
* @pool: pool to allocate from * @pool: pool to allocate from
* @size: number of bytes to allocate from the pool * @size: number of bytes to allocate from the pool
*
* Allocate the requested number of bytes from the specified pool.
* Uses a first-fit algorithm.
*/ */
unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
{ {
@ -157,13 +160,13 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
} }
EXPORT_SYMBOL(gen_pool_alloc); EXPORT_SYMBOL(gen_pool_alloc);
/**
/* * gen_pool_free - free allocated special memory back to the pool
* Free the specified memory back to the specified pool.
*
* @pool: pool to free to * @pool: pool to free to
* @addr: starting address of memory to free back to pool * @addr: starting address of memory to free back to pool
* @size: size in bytes of memory to free * @size: size in bytes of memory to free
*
* Free previously allocated special memory back to the specified pool.
*/ */
void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size) void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size)
{ {