Thread (4 messages) 4 messages, 2 authors, 2010-07-25

Re: [PATCH] of: Provide default of_node_to_nid() when CONFIG_NUMA is not set

From: Grant Likely <hidden>
Date: 2010-07-25 20:38:00
Also in: linux-devicetree, lkml, sparclinux

On Sat, Jul 24, 2010 at 9:07 PM, Stephen Rothwell [off-list ref] wr=
ote:
Hi Grant,

On Sat, 24 Jul 2010 09:43:31 -0600 Grant Likely <grant.likely@secretlab.c=
a> wrote:
quoted
of_node_to_nid() is only relevant for NUMA. =A0Don't force architectures=
 to
quoted
implement it if CONFIG_NUMA is not set.
Why not just do:

#ifndef of_node_to_nid
static inline int of_node_to_nid(struct device_node *device) { return 0; =
}
#define of_node_to_nid =A0of_node_to_nid
#endif

in include/linux/of.h

and then add:

#define of_node_to_nid =A0of_node_to_nid

Where it is declared/defined for each arch ...
(it would be nice if all the archs were consistent in where it was
declared).
Two reasons; I had started doing that in topology.h, but it caused a
bunch of collateral damage with files missing the include, so I punted
and took the easy way out.  Also, I didn't know if that was an
acceptable or safe pattern for override symbols.

I'll spin it again with this pattern and see what it looks.

g.

--
Cheers,
Stephen Rothwell =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sfr@canb.auug.org=
.au
http://www.canb.auug.org.au/~sfr/


--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help