All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified.
@ 2022-02-24  1:43 Yang Li
  2022-02-24 22:02 ` Matthew Wilcox
  2022-02-24 22:11 ` Matthew Wilcox
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Li @ 2022-02-24  1:43 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, Yang Li, Abaci Robot

The warnings were found by running scripts/kernel-doc, which is
caused by using 'make W=1'.

mm/rmap.c:1684: warning: Function parameter or member 'folio' not
described in 'try_to_unmap'
mm/rmap.c:1684: warning: Excess function parameter 'page' description in
'try_to_unmap'
mm/rmap.c:2086: warning: Function parameter or member 'folio' not
described in 'folio_make_device_exclusive'
mm/rmap.c:2086: warning: expecting prototype for
page_make_device_exclusive(). Prototype was for
folio_make_device_exclusive() instead

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 mm/rmap.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index d27d79ec11b7..ebcf17d8ac1c 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1671,7 +1671,7 @@ static int page_not_mapped(struct folio *folio)
 
 /**
  * try_to_unmap - try to remove all page table mappings to a page
- * @page: the page to get unmapped
+ * @folio: The folio we're currently operating on.
  * @flags: action and flags
  *
  * Tries to remove all the page table entries which are mapping this
@@ -2068,8 +2068,8 @@ static bool page_make_device_exclusive_one(struct folio *folio,
 }
 
 /**
- * page_make_device_exclusive - mark the page exclusively owned by a device
- * @page: the page to replace page table entries for
+ * folio_make_device_exclusive - mark the page exclusively owned by a device
+ * @folio: The folio we're currently operating on.
  * @mm: the mm_struct where the page is expected to be mapped
  * @address: address where the page is expected to be mapped
  * @owner: passed to MMU_NOTIFY_EXCLUSIVE range notifier callbacks
-- 
2.20.1.7.g153144c


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

* Re: [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified.
  2022-02-24  1:43 [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified Yang Li
@ 2022-02-24 22:02 ` Matthew Wilcox
  2022-02-24 22:11 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2022-02-24 22:02 UTC (permalink / raw)
  To: Yang Li; +Cc: akpm, linux-mm, linux-kernel, Abaci Robot

On Thu, Feb 24, 2022 at 09:43:44AM +0800, Yang Li wrote:
> The warnings were found by running scripts/kernel-doc, which is
> caused by using 'make W=1'.
> 
> mm/rmap.c:1684: warning: Function parameter or member 'folio' not
> described in 'try_to_unmap'
> mm/rmap.c:1684: warning: Excess function parameter 'page' description in
> 'try_to_unmap'

Fixed these like this instead:

 /**
- * try_to_unmap - try to remove all page table mappings to a page
- * @page: the page to get unmapped
+ * try_to_unmap - Try to remove all page table mappings to a folio.
+ * @folio: The folio to unmap.
  * @flags: action and flags
  *
  * Tries to remove all the page table entries which are mapping this
- * page, used in the pageout path.  Caller must hold the page lock.
+ * folio.  It is the caller's responsibility to check if the folio is
+ * still mapped if needed (use TTU_SYNC to prevent accounting races).
  *
- * It is the caller's responsibility to check if the page is still
- * mapped when needed (use TTU_SYNC to prevent accounting races).
+ * Context: Caller must hold the folio lock.
  */


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

* Re: [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified.
  2022-02-24  1:43 [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified Yang Li
  2022-02-24 22:02 ` Matthew Wilcox
@ 2022-02-24 22:11 ` Matthew Wilcox
  1 sibling, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2022-02-24 22:11 UTC (permalink / raw)
  To: Yang Li; +Cc: akpm, linux-mm, linux-kernel, Abaci Robot

On Thu, Feb 24, 2022 at 09:43:44AM +0800, Yang Li wrote:
> mm/rmap.c:2086: warning: Function parameter or member 'folio' not
> described in 'folio_make_device_exclusive'
> mm/rmap.c:2086: warning: expecting prototype for
> page_make_device_exclusive(). Prototype was for
> folio_make_device_exclusive() instead

 /**
- * page_make_device_exclusive - mark the page exclusively owned by a device
- * @page: the page to replace page table entries for
- * @mm: the mm_struct where the page is expected to be mapped
- * @address: address where the page is expected to be mapped
+ * folio_make_device_exclusive - Mark the folio exclusively owned by a device.
+ * @folio: The folio to replace page table entries for.
+ * @mm: The mm_struct where the folio is expected to be mapped.
+ * @address: Address where the folio is expected to be mapped.
  * @owner: passed to MMU_NOTIFY_EXCLUSIVE range notifier callbacks
  *
- * Tries to remove all the page table entries which are mapping this page and
- * replace them with special device exclusive swap entries to grant a device
- * exclusive access to the page. Caller must hold the page lock.
+ * Tries to remove all the page table entries which are mapping this
+ * folio and replace them with special device exclusive swap entries to
+ * grant a device exclusive access to the folio.
  *
- * Returns false if the page is still mapped, or if it could not be unmapped
+ * Context: Caller must hold the folio lock.
+ * Return: false if the page is still mapped, or if it could not be unmapped
  * from the expected address. Otherwise returns true (success).
  */


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

end of thread, other threads:[~2022-02-24 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24  1:43 [PATCH -next] mm/rmap: Fix argument list that the kdoc format and script verified Yang Li
2022-02-24 22:02 ` Matthew Wilcox
2022-02-24 22:11 ` Matthew Wilcox

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.