* [PATCH -next] kernel/power: Fix some kernel-doc comments
@ 2022-03-25 1:44 Yang Li
2022-04-13 14:46 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2022-03-25 1:44 UTC (permalink / raw)
To: rafael; +Cc: pavel, len.brown, linux-pm, linux-kernel, Yang Li, Abaci Robot
Add parameter description in alloc_rtree_node() kernel-doc
comment and fix several inconsistent function name descriptions.
Remove some warnings found by running scripts/kernel-doc,
which is caused by using 'make W=1'.
kernel/power/snapshot.c:438: warning: Function parameter or member
'gfp_mask' not described in 'alloc_rtree_node'
kernel/power/snapshot.c:438: warning: Function parameter or member
'safe_needed' not described in 'alloc_rtree_node'
kernel/power/snapshot.c:438: warning: Function parameter or member 'ca'
not described in 'alloc_rtree_node'
kernel/power/snapshot.c:438: warning: Function parameter or member
'list' not described in 'alloc_rtree_node'
kernel/power/snapshot.c:916: warning: expecting prototype for
memory_bm_rtree_next_pfn(). Prototype was for memory_bm_next_pfn()
instead
kernel/power/snapshot.c:1947: warning: expecting prototype for
alloc_highmem_image_pages(). Prototype was for alloc_highmem_pages()
instead
kernel/power/snapshot.c:2230: warning: expecting prototype for load
header(). Prototype was for load_header() instead
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
kernel/power/snapshot.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 330d49937692..89c8f9df9fdc 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -427,6 +427,12 @@ struct memory_bitmap {
/**
* alloc_rtree_node - Allocate a new node and add it to the radix tree.
+ * @gfp_mask: GFP mask for the allocation.
+ * @safe_needed: Get pages that were not used before hibernation
+ * (restore only)
+ * @ca: used for allocating small objects out of a linked list of pages
+ * called 'the chain'.
+ * @list: the inner node or leave of Radix Tree to add.
*
* This function is used to allocate inner nodes as well as the
* leave nodes of the radix tree. It also adds the node to the
@@ -902,7 +908,7 @@ static bool rtree_next_node(struct memory_bitmap *bm)
}
/**
- * memory_bm_rtree_next_pfn - Find the next set bit in a memory bitmap.
+ * memory_bm_next_pfn - Find the next set bit in a memory bitmap.
* @bm: Memory bitmap.
*
* Starting from the last returned position this function searches for the next
@@ -1937,7 +1943,7 @@ static inline int get_highmem_buffer(int safe_needed)
}
/**
- * alloc_highmem_image_pages - Allocate some highmem pages for the image.
+ * alloc_highmem_pages - Allocate some highmem pages for the image.
*
* Try to allocate as many pages as needed, but if the number of free highmem
* pages is less than that, allocate them all.
@@ -2224,7 +2230,7 @@ static int check_header(struct swsusp_info *info)
}
/**
- * load header - Check the image header and copy the data from it.
+ * load_header - Check the image header and copy the data from it.
*/
static int load_header(struct swsusp_info *info)
{
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] kernel/power: Fix some kernel-doc comments
2022-03-25 1:44 [PATCH -next] kernel/power: Fix some kernel-doc comments Yang Li
@ 2022-04-13 14:46 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2022-04-13 14:46 UTC (permalink / raw)
To: Yang Li
Cc: Rafael J. Wysocki, Pavel Machek, Len Brown, Linux PM,
Linux Kernel Mailing List, Abaci Robot
On Fri, Mar 25, 2022 at 2:44 AM Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> Add parameter description in alloc_rtree_node() kernel-doc
> comment and fix several inconsistent function name descriptions.
>
> Remove some warnings found by running scripts/kernel-doc,
> which is caused by using 'make W=1'.
>
> kernel/power/snapshot.c:438: warning: Function parameter or member
> 'gfp_mask' not described in 'alloc_rtree_node'
> kernel/power/snapshot.c:438: warning: Function parameter or member
> 'safe_needed' not described in 'alloc_rtree_node'
> kernel/power/snapshot.c:438: warning: Function parameter or member 'ca'
> not described in 'alloc_rtree_node'
> kernel/power/snapshot.c:438: warning: Function parameter or member
> 'list' not described in 'alloc_rtree_node'
> kernel/power/snapshot.c:916: warning: expecting prototype for
> memory_bm_rtree_next_pfn(). Prototype was for memory_bm_next_pfn()
> instead
> kernel/power/snapshot.c:1947: warning: expecting prototype for
> alloc_highmem_image_pages(). Prototype was for alloc_highmem_pages()
> instead
> kernel/power/snapshot.c:2230: warning: expecting prototype for load
> header(). Prototype was for load_header() instead
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
> kernel/power/snapshot.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
> index 330d49937692..89c8f9df9fdc 100644
> --- a/kernel/power/snapshot.c
> +++ b/kernel/power/snapshot.c
> @@ -427,6 +427,12 @@ struct memory_bitmap {
>
> /**
> * alloc_rtree_node - Allocate a new node and add it to the radix tree.
> + * @gfp_mask: GFP mask for the allocation.
> + * @safe_needed: Get pages that were not used before hibernation
> + * (restore only)
> + * @ca: used for allocating small objects out of a linked list of pages
> + * called 'the chain'.
> + * @list: the inner node or leave of Radix Tree to add.
> *
> * This function is used to allocate inner nodes as well as the
> * leave nodes of the radix tree. It also adds the node to the
> @@ -902,7 +908,7 @@ static bool rtree_next_node(struct memory_bitmap *bm)
> }
>
> /**
> - * memory_bm_rtree_next_pfn - Find the next set bit in a memory bitmap.
> + * memory_bm_next_pfn - Find the next set bit in a memory bitmap.
> * @bm: Memory bitmap.
> *
> * Starting from the last returned position this function searches for the next
> @@ -1937,7 +1943,7 @@ static inline int get_highmem_buffer(int safe_needed)
> }
>
> /**
> - * alloc_highmem_image_pages - Allocate some highmem pages for the image.
> + * alloc_highmem_pages - Allocate some highmem pages for the image.
> *
> * Try to allocate as many pages as needed, but if the number of free highmem
> * pages is less than that, allocate them all.
> @@ -2224,7 +2230,7 @@ static int check_header(struct swsusp_info *info)
> }
>
> /**
> - * load header - Check the image header and copy the data from it.
> + * load_header - Check the image header and copy the data from it.
> */
> static int load_header(struct swsusp_info *info)
> {
> --
Applied as 5.19 with edits in the subject and some comment adjustments
to avoid line breaks in kerne-doc.
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-13 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 1:44 [PATCH -next] kernel/power: Fix some kernel-doc comments Yang Li
2022-04-13 14:46 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).