Re: [PATCH] hmm: Suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 23, 2019 at 10:56:09AM -0700, Mike Kravetz wrote:
> 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@xxxxxxxxxxxx>
> > 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@xxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> 
> 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.

Agreed.  I did a couple quick searches and I don't see any such issues.  I was
thinking the same thing WRT zero day.

Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>

> 
> Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
> 
> -- 
> Mike Kravetz
> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux