From: Mike Kravetz <mike.kravetz@oracle.com>
To: Jason Gunthorpe <jgg@mellanox.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Jerome Glisse <jglisse@redhat.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [PATCH] hmm: Suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set
Date: Thu, 23 May 2019 10:56:09 -0700 [thread overview]
Message-ID: <07f97bf3-cc38-6016-b9fc-1dc4efa5a190@oracle.com> (raw)
In-Reply-To: <20190522235102.GA15370@mellanox.com>
On 5/22/19 4:51 PM, Jason Gunthorpe wrote:
> On Wed, May 22, 2019 at 01:23:22PM -0700, Andrew Morton wrote:
>>
>> Also fair enough. But why the heck is huge_page_shift() a macro? We
>> keep doing that and it bites so often :(
>
> Let's fix it, with the below? (compile tested)
>
> Note __alloc_bootmem_huge_page was returning null but the signature
> was unsigned int.
>
> From b5e2ff3c88e6962d0e8297c87af855e6fe1a584e Mon Sep 17 00:00:00 2001
> From: Jason Gunthorpe <jgg@mellanox.com>
> Date: Wed, 22 May 2019 20:45:59 -0300
> Subject: [PATCH] mm: Make !CONFIG_HUGE_PAGE wrappers into static inlines
>
> Instead of using defines, which looses type safety and provokes unused
> variable warnings from gcc, put the constants into static inlines.
>
> Suggested-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Thanks for doing this Jason.
I do not see any issues unless there is some weird arch specific usage which
would be caught by zero day testing.
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
next prev parent reply other threads:[~2019-05-23 17:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 19:51 Jason Gunthorpe
2019-05-22 20:23 ` Andrew Morton
2019-05-22 23:51 ` Jason Gunthorpe
2019-05-23 17:56 ` Mike Kravetz [this message]
2019-05-23 23:49 ` Ira Weiny
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=07f97bf3-cc38-6016-b9fc-1dc4efa5a190@oracle.com \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jgg@mellanox.com \
--cc=jglisse@redhat.com \
--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