From: Hugh Dickins <hughd@google.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org
Subject: Re: [PATCH 2/5] Fix hugetlb_basepage_index missing prototype warning
Date: Tue, 15 Jun 2021 16:16:56 -0700 (PDT) [thread overview]
Message-ID: <8081b4a0-3681-eb15-4bca-7ad2ed10c6ca@google.com> (raw)
In-Reply-To: <20210615200242.1716568-3-willy@infradead.org>
On Tue, 15 Jun 2021, Matthew Wilcox (Oracle) wrote:
> -Wmissing-prototypes requires that the prototype actually be in scope,
> not just previously seen. Move it outside page_to_pgoff().
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Thanks Matthew:
Acked-by: Hugh Dickins <hughd@google.com>
but Andrew please just add as a -fix.patch to
mm-futex-fix-shared-futex-pgoff-on-shmem-huge-page.patch
and merge them in due course - thank you.
> ---
> include/linux/pagemap.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
> index 5f0582de24e7..c4b1514818ff 100644
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@ -585,16 +585,16 @@ static inline pgoff_t page_to_index(struct page *page)
> return pgoff;
> }
>
> +extern pgoff_t hugetlb_basepage_index(struct page *page);
> +
> /*
> * Get the offset in PAGE_SIZE (even for hugetlb pages).
> * (TODO: hugetlb pages should have ->index in PAGE_SIZE)
> */
> static inline pgoff_t page_to_pgoff(struct page *page)
> {
> - if (unlikely(PageHuge(page))) {
> - extern pgoff_t hugetlb_basepage_index(struct page *page);
> + if (unlikely(PageHuge(page)))
> return hugetlb_basepage_index(page);
> - }
> return page_to_index(page);
> }
>
> --
> 2.30.2
next prev parent reply other threads:[~2021-06-15 23:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 20:02 [PATCH 0/5] Remove warnings from today's mmotm Matthew Wilcox (Oracle)
2021-06-15 20:02 ` [PATCH 1/5] mm writeback,cgroup: Fix documentation Matthew Wilcox (Oracle)
2021-06-15 20:02 ` [PATCH 2/5] Fix hugetlb_basepage_index missing prototype warning Matthew Wilcox (Oracle)
2021-06-15 23:16 ` Hugh Dickins [this message]
2021-06-15 20:02 ` [PATCH 3/5] mm/thp: Fix strncpy warning Matthew Wilcox (Oracle)
2021-06-15 20:02 ` [PATCH 4/5] mm/sparse-vmemmap: Fix documentation warning Matthew Wilcox (Oracle)
2021-06-15 20:02 ` [PATCH 5/5] mm: Fix alloc_vmemmap_page_list " Matthew Wilcox (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8081b4a0-3681-eb15-4bca-7ad2ed10c6ca@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox