Skip to content

Commit c95c2d3

Browse files
rddunlaptorvalds
authored andcommitted
lib: remove "expecting prototype" kernel-doc warnings
Fix various kernel-doc warnings in lib/ due to missing or erroneous function names. Add kernel-doc for some function parameters that was missing. Use kernel-doc "Return:" notation in earlycpio.c. Quietens the following warnings: lib/earlycpio.c:61: warning: expecting prototype for cpio_data find_cpio_data(). Prototype was for find_cpio_data() instead lib/lru_cache.c:640: warning: expecting prototype for lc_dump(). Prototype was for lc_seq_dump_details() instead lru_cache.c:90: warning: Function parameter or member 'cache' not described in 'lc_create' lib/parman.c:368: warning: expecting prototype for parman_item_del(). Prototype was for parman_item_remove() instead parman.c:309: warning: Excess function parameter 'prority' description in 'parman_prio_init' lib/radix-tree.c:703: warning: expecting prototype for __radix_tree_insert(). Prototype was for radix_tree_insert() instead radix-tree.c:180: warning: Excess function parameter 'addr' description in 'radix_tree_find_next_bit' radix-tree.c:180: warning: Excess function parameter 'size' description in 'radix_tree_find_next_bit' radix-tree.c:931: warning: Function parameter or member 'iter' not described in 'radix_tree_iter_replace' Link: https://lkml.kernel.org/r/20210411221756.15461-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Philipp Reisner <philipp.reisner@linbit.com> Cc: Lars Ellenberg <lars.ellenberg@linbit.com> Cc: Jiri Pirko <jiri@nvidia.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 04c53de commit c95c2d3

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

lib/earlycpio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ enum cpio_fields {
4040
};
4141

4242
/**
43-
* cpio_data find_cpio_data - Search for files in an uncompressed cpio
43+
* find_cpio_data - Search for files in an uncompressed cpio
4444
* @path: The directory to search for, including a slash at the end
4545
* @data: Pointer to the cpio archive or a header inside
4646
* @len: Remaining length of the cpio based on data pointer
@@ -49,7 +49,7 @@ enum cpio_fields {
4949
* matching file itself. It can be used to iterate through the cpio
5050
* to find all files inside of a directory path.
5151
*
52-
* @return: struct cpio_data containing the address, length and
52+
* Return: &struct cpio_data containing the address, length and
5353
* filename (with the directory path cut off) of the found file.
5454
* If you search for a filename and not for files in a directory,
5555
* pass the absolute path of the filename in the cpio and make sure

lib/lru_cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ int lc_try_lock(struct lru_cache *lc)
7676
/**
7777
* lc_create - prepares to track objects in an active set
7878
* @name: descriptive name only used in lc_seq_printf_stats and lc_seq_dump_details
79+
* @cache: cache root pointer
7980
* @max_pending_changes: maximum changes to accumulate until a transaction is required
8081
* @e_count: number of elements allowed to be active simultaneously
8182
* @e_size: size of the tracked objects
@@ -627,7 +628,7 @@ void lc_set(struct lru_cache *lc, unsigned int enr, int index)
627628
}
628629

629630
/**
630-
* lc_dump - Dump a complete LRU cache to seq in textual form.
631+
* lc_seq_dump_details - Dump a complete LRU cache to seq in textual form.
631632
* @lc: the lru cache to operate on
632633
* @seq: the &struct seq_file pointer to seq_printf into
633634
* @utext: user supplied additional "heading" or other info

lib/parman.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ EXPORT_SYMBOL(parman_destroy);
297297
* parman_prio_init - initializes a parman priority chunk
298298
* @parman: parman instance
299299
* @prio: parman prio structure to be initialized
300-
* @prority: desired priority of the chunk
300+
* @priority: desired priority of the chunk
301301
*
302302
* Note: all locking must be provided by the caller.
303303
*
@@ -356,7 +356,7 @@ int parman_item_add(struct parman *parman, struct parman_prio *prio,
356356
EXPORT_SYMBOL(parman_item_add);
357357

358358
/**
359-
* parman_item_del - deletes parman item
359+
* parman_item_remove - deletes parman item
360360
* @parman: parman instance
361361
* @prio: parman prio instance to delete the item from
362362
* @item: parman item instance

lib/radix-tree.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ static inline void all_tag_set(struct radix_tree_node *node, unsigned int tag)
166166
/**
167167
* radix_tree_find_next_bit - find the next set bit in a memory region
168168
*
169-
* @addr: The address to base the search on
170-
* @size: The bitmap size in bits
171-
* @offset: The bitnumber to start searching at
169+
* @node: where to begin the search
170+
* @tag: the tag index
171+
* @offset: the bitnumber to start searching at
172172
*
173173
* Unrollable variant of find_next_bit() for constant size arrays.
174174
* Tail bits starting from size to roundup(size, BITS_PER_LONG) must be zero.
@@ -461,7 +461,7 @@ static int radix_tree_extend(struct radix_tree_root *root, gfp_t gfp,
461461

462462
/**
463463
* radix_tree_shrink - shrink radix tree to minimum height
464-
* @root radix tree root
464+
* @root:radix tree root
465465
*/
466466
static inline bool radix_tree_shrink(struct radix_tree_root *root)
467467
{
@@ -691,7 +691,7 @@ static inline int insert_entries(struct radix_tree_node *node,
691691
}
692692

693693
/**
694-
*__radix_tree_insert - insert into a radix tree
694+
*radix_tree_insert - insert into a radix tree
695695
* @root: radix tree root
696696
* @index: index key
697697
* @item: item to insert
@@ -919,6 +919,7 @@ EXPORT_SYMBOL(radix_tree_replace_slot);
919919
/**
920920
* radix_tree_iter_replace - replace item in a slot
921921
* @root: radix tree root
922+
* @iter: iterator state
922923
* @slot: pointer to slot
923924
* @item: new item to store in the slot.
924925
*

0 commit comments

Comments
 (0)