Commit a58cbd7c249f3079dd62d6391a33b9f43f2bfbef

Authored by Dean Nelson
Committed by Linus Torvalds
1 parent 322acc96d4

[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>

Showing 1 changed file with 23 additions and 20 deletions Side-by-side Diff

... ... @@ -14,11 +14,13 @@
14 14 #include <linux/genalloc.h>
15 15  
16 16  
17   -/*
18   - * Create a new special memory pool.
19   - *
  17 +/**
  18 + * gen_pool_create - create a new special memory pool
20 19 * @min_alloc_order: log base 2 of number of bytes each bitmap bit represents
21 20 * @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.
22 24 */
23 25 struct gen_pool *gen_pool_create(int min_alloc_order, int nid)
24 26 {
25 27  
... ... @@ -34,15 +36,15 @@
34 36 }
35 37 EXPORT_SYMBOL(gen_pool_create);
36 38  
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
41 41 * @pool: pool to add new memory chunk to
42 42 * @addr: starting address of memory chunk to add to pool
43 43 * @size: size in bytes of the memory chunk to add to pool
44 44 * @nid: node id of the node the chunk structure and bitmap should be
45 45 * allocated on, or -1
  46 + *
  47 + * Add a new chunk of special memory to the specified pool.
46 48 */
47 49 int gen_pool_add(struct gen_pool *pool, unsigned long addr, size_t size,
48 50 int nid)
49 51  
... ... @@ -69,11 +71,12 @@
69 71 }
70 72 EXPORT_SYMBOL(gen_pool_add);
71 73  
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
76 76 * @pool: pool to destroy
  77 + *
  78 + * Destroy the specified special memory pool. Verifies that there are no
  79 + * outstanding allocations.
77 80 */
78 81 void gen_pool_destroy(struct gen_pool *pool)
79 82 {
80 83  
... ... @@ -99,13 +102,13 @@
99 102 }
100 103 EXPORT_SYMBOL(gen_pool_destroy);
101 104  
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
107 107 * @pool: pool to allocate from
108 108 * @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.
109 112 */
110 113 unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size)
111 114 {
112 115  
... ... @@ -157,13 +160,13 @@
157 160 }
158 161 EXPORT_SYMBOL(gen_pool_alloc);
159 162  
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
164 165 * @pool: pool to free to
165 166 * @addr: starting address of memory to free back to pool
166 167 * @size: size in bytes of memory to free
  168 + *
  169 + * Free previously allocated special memory back to the specified pool.
167 170 */
168 171 void gen_pool_free(struct gen_pool *pool, unsigned long addr, size_t size)
169 172 {