* [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static
@ 2019-05-04 10:23 Bharath Vedartham
2019-05-04 11:54 ` Michal Hocko
0 siblings, 1 reply; 3+ messages in thread
From: Bharath Vedartham @ 2019-05-04 10:23 UTC (permalink / raw)
To: akpm, kirill.shutemov, vbabka, mhocko; +Cc: linux-mm, linux-kernel
__thp_get_unmapped_area is only used in mm/huge_memory.c. Make it
static. Tested by building and booting the kernel.
Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
---
mm/huge_memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 165ea46..75fe2b7 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -509,7 +509,7 @@ void prep_transhuge_page(struct page *page)
set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR);
}
-unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
+static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
loff_t off, unsigned long flags, unsigned long size)
{
unsigned long addr;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static
2019-05-04 10:23 [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static Bharath Vedartham
@ 2019-05-04 11:54 ` Michal Hocko
2019-05-04 12:18 ` Bharath Vedartham
0 siblings, 1 reply; 3+ messages in thread
From: Michal Hocko @ 2019-05-04 11:54 UTC (permalink / raw)
To: Bharath Vedartham; +Cc: akpm, kirill.shutemov, vbabka, linux-mm, linux-kernel
On Sat 04-05-19 15:53:54, Bharath Vedartham wrote:
> __thp_get_unmapped_area is only used in mm/huge_memory.c. Make it
> static.
Makes sense. Looks like an omission.
> Tested by building and booting the kernel.
Testing by git grep __thp_get_unmapped_area would give you a better
picture. Build test migh not hit paths that are config specific and
static aspect of a functions should not have any functionality related
side effects AFAICS.
> Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/huge_memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 165ea46..75fe2b7 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -509,7 +509,7 @@ void prep_transhuge_page(struct page *page)
> set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR);
> }
>
> -unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
> +static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
> loff_t off, unsigned long flags, unsigned long size)
> {
> unsigned long addr;
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static
2019-05-04 11:54 ` Michal Hocko
@ 2019-05-04 12:18 ` Bharath Vedartham
0 siblings, 0 replies; 3+ messages in thread
From: Bharath Vedartham @ 2019-05-04 12:18 UTC (permalink / raw)
To: Michal Hocko; +Cc: akpm, kirill.shutemov, vbabka, linux-mm, linux-kernel
On Sat, May 04, 2019 at 07:54:46AM -0400, Michal Hocko wrote:
Hi Michal,
Thanks for having a look at the patch.
> On Sat 04-05-19 15:53:54, Bharath Vedartham wrote:
> > __thp_get_unmapped_area is only used in mm/huge_memory.c. Make it
> > static.
>
> Makes sense. Looks like an omission.
>
> > Tested by building and booting the kernel.
>
> Testing by git grep __thp_get_unmapped_area would give you a better
> picture. Build test migh not hit paths that are config specific and
> static aspect of a functions should not have any functionality related
> side effects AFAICS.
>
I have made sure CONFIG_TRANSPARENT_HUGEPAGE was enabled before building
and booting the kernel. I have also grepped the entire kernel source for
__thp_get_unmapped_area to be very sure.
> > Signed-off-by: Bharath Vedartham <linux.bhar@gmail.com>
>
> Acked-by: Michal Hocko <mhocko@suse.com>
>
> > ---
> > mm/huge_memory.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> > index 165ea46..75fe2b7 100644
> > --- a/mm/huge_memory.c
> > +++ b/mm/huge_memory.c
> > @@ -509,7 +509,7 @@ void prep_transhuge_page(struct page *page)
> > set_compound_page_dtor(page, TRANSHUGE_PAGE_DTOR);
> > }
> >
> > -unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
> > +static unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len,
> > loff_t off, unsigned long flags, unsigned long size)
> > {
> > unsigned long addr;
> > --
> > 2.7.4
> >
>
> --
> Michal Hocko
> SUSE Labs
Thanks
Bharath
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-04 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-04 10:23 [PATCH] mm/huge_memory.c: Make __thp_get_unmapped_area static Bharath Vedartham
2019-05-04 11:54 ` Michal Hocko
2019-05-04 12:18 ` Bharath Vedartham
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).