linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] include/linux/mm: fix release_pages_arg kernel doc comment
@ 2023-01-06 20:33 SeongJae Park
  2023-01-06 21:10 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: SeongJae Park @ 2023-01-06 20:33 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, corbet, linux-doc, SeongJae Park

Commit 449c796768c9 ("mm: teach release_pages() to take an array of
encoded page pointers too") added the kernel doc comment for
release_pages() on top of 'union release_pages_arg', so making 'make
htmldocs' complains as below:

    ./include/linux/mm.h:1268: warning: cannot understand function prototype: 'typedef union '

The kernel doc comment for the function is already on top of the
function's definition in mm/swap.c, and the new comment is actually not
for the function but indeed release_pages_arg.  Fixing the comment to
reflect the intent would be one option.  But, kernel doc cannot parse
the union as below due to the attribute.

    ./include/linux/mm.h:1272: error: Cannot parse struct or union!

Modify the comment to reflect the intent but do not mark it as a kernel
doc comment.

Fixes: 449c796768c9 ("mm: teach release_pages() to take an array of encoded page pointers too")
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 include/linux/mm.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index a2bf261cdbef..3df8815f6d51 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1297,10 +1297,10 @@ static inline void folio_put_refs(struct folio *folio, int refs)
 		__folio_put(folio);
 }
 
-/**
- * release_pages - release an array of pages or folios
+/*
+ * union release_pages_arg - an array of pages or folios
  *
- * This just releases a simple array of multiple pages, and
+ * release_pages() releases a simple array of multiple pages, and
  * accepts various different forms of said page array: either
  * a regular old boring array of pages, an array of folios, or
  * an array of encoded page pointers.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] include/linux/mm: fix release_pages_arg kernel doc comment
  2023-01-06 20:33 [PATCH] include/linux/mm: fix release_pages_arg kernel doc comment SeongJae Park
@ 2023-01-06 21:10 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-01-06 21:10 UTC (permalink / raw)
  To: SeongJae Park, akpm; +Cc: linux-mm, linux-kernel, corbet, linux-doc



On 1/6/23 12:33, SeongJae Park wrote:
> Commit 449c796768c9 ("mm: teach release_pages() to take an array of
> encoded page pointers too") added the kernel doc comment for
> release_pages() on top of 'union release_pages_arg', so making 'make
> htmldocs' complains as below:
> 
>     ./include/linux/mm.h:1268: warning: cannot understand function prototype: 'typedef union '
> 
> The kernel doc comment for the function is already on top of the
> function's definition in mm/swap.c, and the new comment is actually not
> for the function but indeed release_pages_arg.  Fixing the comment to
> reflect the intent would be one option.  But, kernel doc cannot parse
> the union as below due to the attribute.
> 
>     ./include/linux/mm.h:1272: error: Cannot parse struct or union!
> 
> Modify the comment to reflect the intent but do not mark it as a kernel
> doc comment.
> 
> Fixes: 449c796768c9 ("mm: teach release_pages() to take an array of encoded page pointers too")
> Signed-off-by: SeongJae Park <sj@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  include/linux/mm.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index a2bf261cdbef..3df8815f6d51 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1297,10 +1297,10 @@ static inline void folio_put_refs(struct folio *folio, int refs)
>  		__folio_put(folio);
>  }
>  
> -/**
> - * release_pages - release an array of pages or folios
> +/*
> + * union release_pages_arg - an array of pages or folios
>   *
> - * This just releases a simple array of multiple pages, and
> + * release_pages() releases a simple array of multiple pages, and
>   * accepts various different forms of said page array: either
>   * a regular old boring array of pages, an array of folios, or
>   * an array of encoded page pointers.

-- 
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-06 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 20:33 [PATCH] include/linux/mm: fix release_pages_arg kernel doc comment SeongJae Park
2023-01-06 21:10 ` Randy Dunlap

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).