Thread (34 messages) 34 messages, 4 authors, 2019-12-17

Re: [RFC PATCH] mm/gup: try_pin_compound_head() can be static

From: John Hubbard <jhubbard@nvidia.com>
Date: 2019-12-17 14:00:10
Also in: bpf, dri-devel, kvm, linux-block, linux-fsdevel, linux-kselftest, linux-media, linux-mm, linux-rdma, linuxppc-dev, lkml, netdev, oe-kbuild-all
Subsystem: memory management, memory management - gup (get user pages), the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

On 12/17/19 12:03 AM, kbuild test robot wrote:
quoted hunk ↗ jump to hunk
Fixes: 8086d1c61970 ("mm/gup: track FOLL_PIN pages")
Signed-off-by: kbuild test robot <redacted>
---
  gup.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/gup.c b/mm/gup.c
index 038b71165a761..849a6f55938e6 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -75,7 +75,7 @@ static inline struct page *try_get_compound_head(struct page *page, int refs)
   * @Return:	the compound head page, with ref appropriately incremented,
   * or NULL upon failure.
   */
-__must_check struct page *try_pin_compound_head(struct page *page, int refs)
+static __must_check struct page *try_pin_compound_head(struct page *page, int refs)
  {
  	struct page *head = try_get_compound_head(page,
  						  GUP_PIN_COUNTING_BIAS * refs);
Yes, it should have been declared static. And this also applies to the latest version
(v11). The preferred fix would stay within 80 columns, like this:
diff --git a/mm/gup.c b/mm/gup.c
index c2793a86450e..39b2f683bd2e 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -75,7 +75,8 @@ static inline struct page *try_get_compound_head(struct page *page, int refs)
   * @Return:    the compound head page, with ref appropriately incremented,
   * or NULL upon failure.
   */
-__must_check struct page *try_pin_compound_head(struct page *page, int refs)
+static __must_check struct page *try_pin_compound_head(struct page *page,
+                                                      int refs)
  {
         struct page *head = try_get_compound_head(page,
                                                   GUP_PIN_COUNTING_BIAS * refs);

thanks,
-- 
John Hubbard
NVIDIA
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help