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

Stephen Rothwell sfr at canb.auug.org.au
Sun Jul 25 13:07:23 EST 2010

Hi Grant,

On Sat, 24 Jul 2010 09:43:31 -0600 Grant Likely <grant.likely at secretlab.ca> wrote:
> of_node_to_nid() is only relevant for NUMA.  Don't force architectures to
> 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	of_node_to_nid

in include/linux/of.h

and then add:

#define of_node_to_nid	of_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
Stephen Rothwell                    sfr at canb.auug.org.au
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100725/65509e80/attachment.pgp>

More information about the Linuxppc-dev mailing list