All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Rashika Kheria <rashika.kheria@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Jiang Liu <jiang.liu@huawei.com>,
	Michel Lespinasse <walken@google.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 9/9] mm: Remove ifdef condition in include/linux/mm.h
Date: Fri, 7 Feb 2014 13:15:29 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1402071314180.4212@chino.kir.corp.google.com> (raw)
In-Reply-To: <20140207210705.GB13604@jtriplet-mobl1>

On Fri, 7 Feb 2014, Josh Triplett wrote:

> > > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > > index 1cedd00..5f8348f 100644
> > > --- a/include/linux/mm.h
> > > +++ b/include/linux/mm.h
> > > @@ -1589,10 +1589,8 @@ static inline int __early_pfn_to_nid(unsigned long pfn)
> > >  #else
> > >  /* please see mm/page_alloc.c */
> > >  extern int __meminit early_pfn_to_nid(unsigned long pfn);
> > > -#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
> > >  /* there is a per-arch backend function. */
> > >  extern int __meminit __early_pfn_to_nid(unsigned long pfn);
> > > -#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
> > >  #endif
> > >  
> > >  extern void set_dma_reserve(unsigned long new_dma_reserve);
> > 
> > Wouldn't it be better to just declare the __early_pfn_to_nid() in 
> > mm/page_alloc.c to be static?
> 
> Won't that break the ability to override that function in
> architecture-specific code (as arch/ia64/mm/numa.c does)?
> 

Why?  CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID should define where this function 
is defined so ia64 should have it set and the definition which I'm 
suggesting be static is only compiled when this is undefined in 
mm/page_alloc.c.  I'm not sure why we'd want to be messing with the 
declaration?

WARNING: multiple messages have this Message-ID (diff)
From: David Rientjes <rientjes@google.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Rashika Kheria <rashika.kheria@gmail.com>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Jiang Liu <jiang.liu@huawei.com>,
	Michel Lespinasse <walken@google.com>,
	linux-mm@kvack.org
Subject: Re: [PATCH 9/9] mm: Remove ifdef condition in include/linux/mm.h
Date: Fri, 7 Feb 2014 13:15:29 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1402071314180.4212@chino.kir.corp.google.com> (raw)
In-Reply-To: <20140207210705.GB13604@jtriplet-mobl1>

On Fri, 7 Feb 2014, Josh Triplett wrote:

> > > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > > index 1cedd00..5f8348f 100644
> > > --- a/include/linux/mm.h
> > > +++ b/include/linux/mm.h
> > > @@ -1589,10 +1589,8 @@ static inline int __early_pfn_to_nid(unsigned long pfn)
> > >  #else
> > >  /* please see mm/page_alloc.c */
> > >  extern int __meminit early_pfn_to_nid(unsigned long pfn);
> > > -#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
> > >  /* there is a per-arch backend function. */
> > >  extern int __meminit __early_pfn_to_nid(unsigned long pfn);
> > > -#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
> > >  #endif
> > >  
> > >  extern void set_dma_reserve(unsigned long new_dma_reserve);
> > 
> > Wouldn't it be better to just declare the __early_pfn_to_nid() in 
> > mm/page_alloc.c to be static?
> 
> Won't that break the ability to override that function in
> architecture-specific code (as arch/ia64/mm/numa.c does)?
> 

Why?  CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID should define where this function 
is defined so ia64 should have it set and the definition which I'm 
suggesting be static is only compiled when this is undefined in 
mm/page_alloc.c.  I'm not sure why we'd want to be messing with the 
declaration?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-02-07 21:15 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07 12:01 [PATCH 1/9] mm: Mark function as static in compaction.c Rashika Kheria
2014-02-07 12:01 ` Rashika Kheria
2014-02-07 12:03 ` [PATCH 2/9] mm: Mark functions as static in memory.c Rashika Kheria
2014-02-07 12:03   ` Rashika Kheria
2014-02-07 13:03   ` Rik van Riel
2014-02-07 13:03     ` Rik van Riel
2014-02-07 20:47   ` David Rientjes
2014-02-07 20:47     ` David Rientjes
2014-02-07 12:04 ` [PATCH 3/9] mm: Mark function as static in mmap.c Rashika Kheria
2014-02-07 12:04   ` Rashika Kheria
2014-02-07 13:16   ` Rik van Riel
2014-02-07 13:16     ` Rik van Riel
2014-02-07 20:47   ` David Rientjes
2014-02-07 20:47     ` David Rientjes
2014-02-07 12:07 ` [PATCH 4/9] mm: Mark function as static in process_vm_access.c Rashika Kheria
2014-02-07 12:07   ` Rashika Kheria
2014-02-07 20:49   ` David Rientjes
2014-02-07 20:49     ` David Rientjes
2014-02-07 12:08 ` [PATCH 5/9] mm: Mark functions as static in migrate.c Rashika Kheria
2014-02-07 12:08   ` Rashika Kheria
2014-02-07 13:16   ` Rik van Riel
2014-02-07 13:16     ` Rik van Riel
2014-02-07 20:49   ` David Rientjes
2014-02-07 20:49     ` David Rientjes
2014-02-07 12:10 ` [PATCH 6/9] mm: Mark function as static in memcontrol.c Rashika Kheria
2014-02-07 12:10   ` Rashika Kheria
2014-02-07 12:10   ` Rashika Kheria
2014-02-07 20:55   ` David Rientjes
2014-02-07 20:55     ` David Rientjes
2014-02-07 20:55     ` David Rientjes
     [not found] ` <a7658fc8f2ab015bffe83de1448cc3db79d2a9fc.1391167128.git.rashika.kheria-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-07 12:11   ` [PATCH 7/9] mm: Mark functions as static in page_cgroup.c Rashika Kheria
2014-02-07 12:11 ` Rashika Kheria
2014-02-07 12:11   ` Rashika Kheria
2014-02-07 12:11   ` Rashika Kheria
2014-02-07 20:56   ` David Rientjes
2014-02-07 20:56     ` David Rientjes
2014-02-07 20:56     ` David Rientjes
     [not found]   ` <6054d570fc83c3d4f3de240d6da488f876e21450.1391167128.git.rashika.kheria-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-02-07 20:56     ` David Rientjes
2014-02-10  8:23   ` Michal Hocko
2014-02-10  8:23     ` Michal Hocko
2014-02-07 12:12 ` [PATCH 8/9] mm: Mark function as static in nobootmem.c Rashika Kheria
2014-02-07 12:12   ` Rashika Kheria
2014-02-07 20:57   ` David Rientjes
2014-02-07 20:57     ` David Rientjes
2014-02-07 12:15 ` [PATCH 9/9] mm: Remove ifdef condition in include/linux/mm.h Rashika Kheria
2014-02-07 12:15   ` Rashika Kheria
2014-02-07 13:18   ` Rik van Riel
2014-02-07 13:18     ` Rik van Riel
2014-02-07 21:04   ` David Rientjes
2014-02-07 21:04     ` David Rientjes
2014-02-07 21:07     ` Josh Triplett
2014-02-07 21:07       ` Josh Triplett
2014-02-07 21:15       ` David Rientjes [this message]
2014-02-07 21:15         ` David Rientjes
2014-02-07 22:30         ` Andrew Morton
2014-02-07 22:30           ` Andrew Morton
2014-02-07 23:09           ` David Rientjes
2014-02-07 23:09             ` David Rientjes
2014-02-07 23:27             ` Josh Triplett
2014-02-07 23:27               ` Josh Triplett
2014-02-08  1:02               ` David Rientjes
2014-02-08  1:02                 ` David Rientjes
2014-02-08  1:25                 ` Josh Triplett
2014-02-08  1:25                   ` Josh Triplett
2014-02-07 12:51 ` [PATCH 1/9] mm: Mark function as static in compaction.c Rik van Riel
2014-02-07 12:51   ` Rik van Riel
2014-02-07 20:43 ` David Rientjes
2014-02-07 20:43   ` David Rientjes

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=alpine.DEB.2.02.1402071314180.4212@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=jiang.liu@huawei.com \
    --cc=josh@joshtriplett.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rashika.kheria@gmail.com \
    --cc=riel@redhat.com \
    --cc=walken@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.