Skip to content

Commit a58cbd7

Browse files
Dean NelsonLinus Torvalds
authored andcommitted
[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>
1 parent 322acc9 commit a58cbd7

1 file changed

Lines changed: 23 additions & 20 deletions

File tree

‎lib/genalloc.c‎

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
#include <linux/genalloc.h>
1515

1616

17-
/*
18-
* Create a new special memory pool.
19-
*
17+
/**
18+
* gen_pool_create - create a new special memory pool
2019
* @min_alloc_order: log base 2 of number of bytes each bitmap bit represents
2120
* @nid: node id of the node the pool structure should be allocated on, or -1
21+
*
22+
* Create a new special memory pool that can be used to manage special purpose
23+
* memory not managed by the regular kmalloc/kfree interface.
2224
*/
2325
struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
2426
{
@@ -34,15 +36,15 @@ struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
3436
}
3537
EXPORT_SYMBOL(gen_pool_create);
3638

37-
38-
/*
39-
* Add a new chunk of memory to the specified pool.
40-
*
39+
/**
40+
* gen_pool_add - add a new chunk of special memory to the pool
4141
* @pool: pool to add new memory chunk to
4242
* @addr: starting address of memory chunk to add to pool
4343
* @size: size in bytes of the memory chunk to add to pool
4444
* @nid: node id of the node the chunk structure and bitmap should be
4545
* allocated on, or -1
46+
*
47+
* Add a new chunk of special memory to the specified pool.
4648
*/
4749
int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
4850
int nid)
@@ -69,11 +71,12 @@ int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
6971
}
7072
EXPORT_SYMBOL(gen_pool_add);
7173

72-
73-
/*
74-
* Destroy a memory pool. Verifies that there are no outstanding allocations.
75-
*
74+
/**
75+
* gen_pool_destroy - destroy a special memory pool
7676
* @pool: pool to destroy
77+
*
78+
* Destroy the specified special memory pool. Verifies that there are no
79+
* outstanding allocations.
7780
*/
7881
void gen_pool_destroy(struct gen_pool *pool)
7982
{
@@ -99,13 +102,13 @@ void gen_pool_destroy(struct gen_pool *pool)
99102
}
100103
EXPORT_SYMBOL(gen_pool_destroy);
101104

102-
103-
/*
104-
* Allocate the requested number of bytes from the specified pool.
105-
* Uses a first-fit algorithm.
106-
*
105+
/**
106+
* gen_pool_alloc - allocate special memory from the pool
107107
* @pool: pool to allocate from
108108
* @size: number of bytes to allocate from the pool
109+
*
110+
* Allocate the requested number of bytes from the specified pool.
111+
* Uses a first-fit algorithm.
109112
*/
110113
unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
111114
{
@@ -157,13 +160,13 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
157160
}
158161
EXPORT_SYMBOL(gen_pool_alloc);
159162

160-
161-
/*
162-
* Free the specified memory back to the specified pool.
163-
*
163+
/**
164+
* gen_pool_free - free allocated special memory back to the pool
164165
* @pool: pool to free to
165166
* @addr: starting address of memory to free back to pool
166167
* @size: size in bytes of memory to free
168+
*
169+
* Free previously allocated special memory back to the specified pool.
167170
*/
168171
void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size)
169172
{

0 commit comments

Comments
 (0)