All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm/gup.c: Fix the comment of return value for populate_vma_page_range()
@ 2020-07-20  3:43 Tang Yizhou
  2020-07-21 23:46 ` Ira Weiny
  0 siblings, 1 reply; 2+ messages in thread
From: Tang Yizhou @ 2020-07-20  3:43 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-next, linux-kernel, akpm

The return value of populate_vma_page_range() is consistent with
__get_user_pages(), and so is the function comment of return value.

Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
---
 mm/gup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/gup.c b/mm/gup.c
index 2cc5eba44362..a55f1ec712e9 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1386,7 +1386,8 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
  *
  * This takes care of mlocking the pages too if VM_LOCKED is set.
  *
- * return 0 on success, negative error code on error.
+ * Return either number of pages pinned in the vma, or a negative error
+ * code on error.
  *
  * vma->vm_mm->mmap_lock must be held.
  *
-- 
2.17.1


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

* Re: [PATCH -next] mm/gup.c: Fix the comment of return value for populate_vma_page_range()
  2020-07-20  3:43 [PATCH -next] mm/gup.c: Fix the comment of return value for populate_vma_page_range() Tang Yizhou
@ 2020-07-21 23:46 ` Ira Weiny
  0 siblings, 0 replies; 2+ messages in thread
From: Ira Weiny @ 2020-07-21 23:46 UTC (permalink / raw)
  To: Tang Yizhou; +Cc: linux-mm, linux-next, linux-kernel, akpm

On Mon, Jul 20, 2020 at 11:43:03AM +0800, Tang Yizhou wrote:
> The return value of populate_vma_page_range() is consistent with
> __get_user_pages(), and so is the function comment of return value.
> 
> Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> ---
>  mm/gup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index 2cc5eba44362..a55f1ec712e9 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -1386,7 +1386,8 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
>   *
>   * This takes care of mlocking the pages too if VM_LOCKED is set.
>   *
> - * return 0 on success, negative error code on error.
> + * Return either number of pages pinned in the vma, or a negative error
> + * code on error.
>   *
>   * vma->vm_mm->mmap_lock must be held.
>   *
> -- 
> 2.17.1
> 

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

end of thread, other threads:[~2020-07-21 23:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  3:43 [PATCH -next] mm/gup.c: Fix the comment of return value for populate_vma_page_range() Tang Yizhou
2020-07-21 23:46 ` Ira Weiny

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.