linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 47/56] memblock: fix kernel-doc markups
       [not found] <cover.1603469755.git.mchehab+huawei@kernel.org>
@ 2020-10-23 16:33 ` Mauro Carvalho Chehab
  2020-10-25  6:34   ` Mike Rapoport
  2020-10-23 16:33 ` [PATCH v3 54/56] mm: " Mauro Carvalho Chehab
  1 sibling, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2020-10-23 16:33 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Mike Rapoport,
	linux-kernel, linux-mm

Some identifiers have different names between their prototypes
and the kernel-doc markup.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 include/linux/memblock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index ef131255cedc..95fe3cb71c54 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -272,7 +272,7 @@ void __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
 				  unsigned long *out_spfn,
 				  unsigned long *out_epfn);
 /**
- * for_each_free_mem_range_in_zone - iterate through zone specific free
+ * for_each_free_mem_pfn_range_in_zone - iterate through zone specific free
  * memblock areas
  * @i: u64 used as loop variable
  * @zone: zone in which all of the memory blocks reside
@@ -292,7 +292,7 @@ void __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
 	     __next_mem_pfn_range_in_zone(&i, zone, p_start, p_end))
 
 /**
- * for_each_free_mem_range_in_zone_from - iterate through zone specific
+ * for_each_free_mem_pfn_range_in_zone_from - iterate through zone specific
  * free memblock areas from a given point
  * @i: u64 used as loop variable
  * @zone: zone in which all of the memory blocks reside
-- 
2.26.2



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

* [PATCH v3 54/56] mm: fix kernel-doc markups
       [not found] <cover.1603469755.git.mchehab+huawei@kernel.org>
  2020-10-23 16:33 ` [PATCH v3 47/56] memblock: fix kernel-doc markups Mauro Carvalho Chehab
@ 2020-10-23 16:33 ` Mauro Carvalho Chehab
  2020-10-23 17:46   ` Matthew Wilcox
  1 sibling, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2020-10-23 16:33 UTC (permalink / raw)
  To: Linux Doc Mailing List
  Cc: Mauro Carvalho Chehab, Jonathan Corbet, Andrew Morton,
	linux-kernel, linux-mm

Kernel-doc markups should use this format:
        identifier - description

Fix some issues on mm files:

1) The definition for get_user_pages_locked() doesn't follow
   it. Also, it expects a short descrpition at the header,
   followed by a long one, after the parameters. Fix it.

2) Kernel-doc requires that a kernel-doc markup to be immediatly
   below the function prototype, as otherwise it will rename it.
   So, move get_pfnblock_flags_mask() description to the right
   place.

3) Make invalidate_mapping_pagevec() to also follow the
   expected kernel-doc format.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 mm/gup.c        | 24 +++++++++++++-----------
 mm/page_alloc.c | 16 ++++++++--------
 mm/truncate.c   | 10 ++++++++--
 3 files changed, 29 insertions(+), 21 deletions(-)

diff --git a/mm/gup.c b/mm/gup.c
index 102877ed77a4..3dc7c0fe9231 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1926,7 +1926,19 @@ long get_user_pages(unsigned long start, unsigned long nr_pages,
 EXPORT_SYMBOL(get_user_pages);
 
 /**
- * get_user_pages_locked() is suitable to replace the form:
+ * get_user_pages_locked() - variant of get_user_pages()
+ *
+ * @start:      starting user address
+ * @nr_pages:   number of pages from start to pin
+ * @gup_flags:  flags modifying lookup behaviour
+ * @pages:      array that receives pointers to the pages pinned.
+ *              Should be at least nr_pages long. Or NULL, if caller
+ *              only intends to ensure the pages are faulted in.
+ * @locked:     pointer to lock flag indicating whether lock is held and
+ *              subsequently whether VM_FAULT_RETRY functionality can be
+ *              utilised. Lock must initially be held.
+ *
+ * It is suitable to replace the form:
  *
  *      mmap_read_lock(mm);
  *      do_something()
@@ -1942,16 +1954,6 @@ EXPORT_SYMBOL(get_user_pages);
  *      if (locked)
  *          mmap_read_unlock(mm);
  *
- * @start:      starting user address
- * @nr_pages:   number of pages from start to pin
- * @gup_flags:  flags modifying lookup behaviour
- * @pages:      array that receives pointers to the pages pinned.
- *              Should be at least nr_pages long. Or NULL, if caller
- *              only intends to ensure the pages are faulted in.
- * @locked:     pointer to lock flag indicating whether lock is held and
- *              subsequently whether VM_FAULT_RETRY functionality can be
- *              utilised. Lock must initially be held.
- *
  * We can leverage the VM_FAULT_RETRY functionality in the page fault
  * paths better by using either get_user_pages_locked() or
  * get_user_pages_unlocked().
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 23f5066bd4a5..c94094ce1621 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -495,14 +495,6 @@ static inline int pfn_to_bitidx(struct page *page, unsigned long pfn)
 	return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS;
 }
 
-/**
- * get_pfnblock_flags_mask - Return the requested group of flags for the pageblock_nr_pages block of pages
- * @page: The page within the block of interest
- * @pfn: The target page frame number
- * @mask: mask of bits that the caller is interested in
- *
- * Return: pageblock_bits flags
- */
 static __always_inline
 unsigned long __get_pfnblock_flags_mask(struct page *page,
 					unsigned long pfn,
@@ -521,6 +513,14 @@ unsigned long __get_pfnblock_flags_mask(struct page *page,
 	return (word >> bitidx) & mask;
 }
 
+/**
+ * get_pfnblock_flags_mask - Return the requested group of flags for the pageblock_nr_pages block of pages
+ * @page: The page within the block of interest
+ * @pfn: The target page frame number
+ * @mask: mask of bits that the caller is interested in
+ *
+ * Return: pageblock_bits flags
+ */
 unsigned long get_pfnblock_flags_mask(struct page *page, unsigned long pfn,
 					unsigned long mask)
 {
diff --git a/mm/truncate.c b/mm/truncate.c
index 18cec39a9f53..58fa634cf4f8 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -637,9 +637,15 @@ unsigned long invalidate_mapping_pages(struct address_space *mapping,
 EXPORT_SYMBOL(invalidate_mapping_pages);
 
 /**
- * This helper is similar with the above one, except that it accounts for pages
- * that are likely on a pagevec and count them in @nr_pagevec, which will used by
+ * invalidate_mapping_pagevec - This helper is similar with
+ * invalidate_mapping_pages(), except that it accounts for pages tat are
+ * likely on a pagevec and count them in @nr_pagevec, which will used by
  * the caller.
+ *
+ * @mapping: the address_space which holds the pages to invalidate
+ * @start: the offset 'from' which to invalidate
+ * @end: the offset 'to' which to invalidate (inclusive)
+ *
  */
 void invalidate_mapping_pagevec(struct address_space *mapping,
 		pgoff_t start, pgoff_t end, unsigned long *nr_pagevec)
-- 
2.26.2



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

* Re: [PATCH v3 54/56] mm: fix kernel-doc markups
  2020-10-23 16:33 ` [PATCH v3 54/56] mm: " Mauro Carvalho Chehab
@ 2020-10-23 17:46   ` Matthew Wilcox
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Wilcox @ 2020-10-23 17:46 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Jonathan Corbet, Andrew Morton,
	linux-kernel, linux-mm

On Fri, Oct 23, 2020 at 06:33:41PM +0200, Mauro Carvalho Chehab wrote:
>  /**
> - * This helper is similar with the above one, except that it accounts for pages
> - * that are likely on a pagevec and count them in @nr_pagevec, which will used by
> + * invalidate_mapping_pagevec - This helper is similar with
> + * invalidate_mapping_pages(), except that it accounts for pages tat are

You introduced a typo here, s/tat/that/

> + * likely on a pagevec and count them in @nr_pagevec, which will used by

... and while you're touching this paragraph, s/will used/will be used/
and s/similar with/similar to/

>   * the caller.
> + *
> + * @mapping: the address_space which holds the pages to invalidate
> + * @start: the offset 'from' which to invalidate
> + * @end: the offset 'to' which to invalidate (inclusive)
> + *
>   */
>  void invalidate_mapping_pagevec(struct address_space *mapping,
>  		pgoff_t start, pgoff_t end, unsigned long *nr_pagevec)
> -- 
> 2.26.2
> 
> 


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

* Re: [PATCH v3 47/56] memblock: fix kernel-doc markups
  2020-10-23 16:33 ` [PATCH v3 47/56] memblock: fix kernel-doc markups Mauro Carvalho Chehab
@ 2020-10-25  6:34   ` Mike Rapoport
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2020-10-25  6:34 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Doc Mailing List, Jonathan Corbet, linux-kernel, linux-mm

On Fri, Oct 23, 2020 at 06:33:34PM +0200, Mauro Carvalho Chehab wrote:
> Some identifiers have different names between their prototypes
> and the kernel-doc markup.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Acked-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  include/linux/memblock.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/memblock.h b/include/linux/memblock.h
> index ef131255cedc..95fe3cb71c54 100644
> --- a/include/linux/memblock.h
> +++ b/include/linux/memblock.h
> @@ -272,7 +272,7 @@ void __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
>  				  unsigned long *out_spfn,
>  				  unsigned long *out_epfn);
>  /**
> - * for_each_free_mem_range_in_zone - iterate through zone specific free
> + * for_each_free_mem_pfn_range_in_zone - iterate through zone specific free
>   * memblock areas
>   * @i: u64 used as loop variable
>   * @zone: zone in which all of the memory blocks reside
> @@ -292,7 +292,7 @@ void __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
>  	     __next_mem_pfn_range_in_zone(&i, zone, p_start, p_end))
>  
>  /**
> - * for_each_free_mem_range_in_zone_from - iterate through zone specific
> + * for_each_free_mem_pfn_range_in_zone_from - iterate through zone specific
>   * free memblock areas from a given point
>   * @i: u64 used as loop variable
>   * @zone: zone in which all of the memory blocks reside
> -- 
> 2.26.2
> 

-- 
Sincerely yours,
Mike.


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

end of thread, other threads:[~2020-10-25  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1603469755.git.mchehab+huawei@kernel.org>
2020-10-23 16:33 ` [PATCH v3 47/56] memblock: fix kernel-doc markups Mauro Carvalho Chehab
2020-10-25  6:34   ` Mike Rapoport
2020-10-23 16:33 ` [PATCH v3 54/56] mm: " Mauro Carvalho Chehab
2020-10-23 17:46   ` Matthew Wilcox

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