linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	linux-mm@kvack.org, "Joel Stanley" <joel@jms.id.au>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Nathan Fontenot" <nfont@linux.vnet.ibm.com>,
	"Michael Bringmann" <mwb@linux.vnet.ibm.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Thiago Jung Bauermann" <bauerman@linux.vnet.ibm.com>,
	"Anshuman Khandual" <khandual@linux.vnet.ibm.com>
Subject: [PATCH 3/6] powerpc: numa: Use the right #ifdef guards around functions
Date: Tue, 20 Feb 2018 17:14:21 +0100	[thread overview]
Message-ID: <20180220161424.5421-4-j.neuschaefer@gmx.net> (raw)
In-Reply-To: <20180220161424.5421-1-j.neuschaefer@gmx.net>

of_node_to_nid and dump_numa_cpu_topology are declared inline in their
respective header files, if CONFIG_NUMA is not set. Thus it is only
valid to define these functions in numa.c if CONFIG_NUMA is set.
(numa.c, despite the name, isn't conditionalized on CONFIG_NUMA, but
CONFIG_NEED_MULTIPLE_NODES.)

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
 arch/powerpc/mm/numa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 0570bc2a0b13..df03a65b658f 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -254,6 +254,7 @@ static int of_node_to_nid_single(struct device_node *device)
 	return nid;
 }
 
+#ifdef CONFIG_NUMA
 /* Walk the device tree upwards, looking for an associativity id */
 int of_node_to_nid(struct device_node *device)
 {
@@ -272,6 +273,7 @@ int of_node_to_nid(struct device_node *device)
 	return nid;
 }
 EXPORT_SYMBOL(of_node_to_nid);
+#endif
 
 static int __init find_min_common_depth(void)
 {
@@ -744,6 +746,7 @@ static void __init setup_nonnuma(void)
 	}
 }
 
+#ifdef CONFIG_NUMA
 void __init dump_numa_cpu_topology(void)
 {
 	unsigned int node;
@@ -778,6 +781,7 @@ void __init dump_numa_cpu_topology(void)
 		pr_cont("\n");
 	}
 }
+#endif
 
 /* Initialize NODE_DATA for a node on the local memory */
 static void __init setup_node_data(int nid, u64 start_pfn, u64 end_pfn)
-- 
2.16.1

  parent reply	other threads:[~2018-02-21  0:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 16:14 [PATCH 0/6] DISCONTIGMEM support for PPC32 Jonathan Neuschäfer
2018-02-20 16:14 ` [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM Jonathan Neuschäfer
2018-02-20 17:45   ` christophe leroy
2018-02-21 13:51     ` Jonathan Neuschäfer
2018-02-21 14:44       ` Jonathan Neuschäfer
2018-02-20 16:14 ` [PATCH 2/6] powerpc: numa: Fix overshift on PPC32 Jonathan Neuschäfer
2018-02-20 16:14 ` Jonathan Neuschäfer [this message]
2018-02-20 16:14 ` [PATCH 4/6] powerpc: numa: Restrict fake NUMA enulation to CONFIG_NUMA systems Jonathan Neuschäfer
2018-02-20 16:14 ` [PATCH 5/6] powerpc: Implement DISCONTIGMEM and allow selection on PPC32 Jonathan Neuschäfer
2018-02-20 23:46   ` kbuild test robot
2018-02-21 16:08     ` Jonathan Neuschäfer
2018-02-21 17:53       ` christophe leroy
2018-02-20 16:14 ` [PATCH 6/6] powerpc: wii: Don't rely on reserved memory hack if DISCONTIGMEM is set Jonathan Neuschäfer
2018-02-21  7:06 ` [PATCH 0/6] DISCONTIGMEM support for PPC32 Christophe LEROY
2018-02-21 14:42   ` Jonathan Neuschäfer
2018-02-21 15:02     ` Christophe LEROY
2018-02-21 16:52       ` Jonathan Neuschäfer
2018-02-21 23:31       ` Jonathan Neuschäfer

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=20180220161424.5421-4-j.neuschaefer@gmx.net \
    --to=j.neuschaefer@gmx.net \
    --cc=bauerman@linux.vnet.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=joel@jms.id.au \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=mwb@linux.vnet.ibm.com \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    /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).