From: Mike Kravetz <mike.kravetz@oracle.com>
To: "Ben Dooks (Codethink)" <ben.dooks@codethink.co.uk>,
linux-kernel@lists.codethink.co.uk
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: huge_pte_offset() returns pte_t *, not integer
Date: Mon, 28 Oct 2019 14:55:13 -0700 [thread overview]
Message-ID: <bd0ac181-7334-9970-b16a-ce7fd78d30ec@oracle.com> (raw)
In-Reply-To: <20191016095111.29163-1-ben.dooks@codethink.co.uk>
Cc: Andrew
There are already a few hugetlbfs cleanups in the mm tree.
On 10/16/19 2:51 AM, Ben Dooks (Codethink) wrote:
> The huge_pte_offset() returns a pte_t *, not an integer
> so when huge-tlb is off, the replacement inline macro
> should return a pte_t * too.
>
> This fixes the following sparse warning:
>
> mm/page_vma_mapped.c:156:29: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
That is simple enough,
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
> ---
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
> include/linux/hugetlb.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 53fc34f930d0..e42c76aa1577 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -185,7 +185,7 @@ static inline void hugetlb_show_meminfo(void)
> #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; })
> #define hugetlb_mcopy_atomic_pte(dst_mm, dst_pte, dst_vma, dst_addr, \
> src_addr, pagep) ({ BUG(); 0; })
> -#define huge_pte_offset(mm, address, sz) 0
> +#define huge_pte_offset(mm, address, sz) (pte_t *)NULL
>
> static inline bool isolate_huge_page(struct page *page, struct list_head *list)
> {
>
next prev parent reply other threads:[~2019-10-28 21:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 9:51 [PATCH] mm: huge_pte_offset() returns pte_t *, not integer Ben Dooks (Codethink)
2019-10-28 21:55 ` Mike Kravetz [this message]
2019-10-29 12:35 ` Jason Gunthorpe
2019-10-29 23:28 ` Mike Kravetz
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=bd0ac181-7334-9970-b16a-ce7fd78d30ec@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=ben.dooks@codethink.co.uk \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).