Stephen Rothwell reported the following failure on powerpc:
ERROR: modpost: ".local_memory_node"
[drivers/net/ethernet/fungible/funeth/funeth.ko] undefined!
AFAICS this is because local_memory_node() is a non-inline non-exported
function when CONFIG_HAVE_MEMORYLESS_NODES=y. It is also the wrong API
to get a CPU's memory node. Use cpu_to_mem() in the two spots it's used.
Fixes: ee6373ddf3a9 ("net/funeth: probing and netdev ops")
Fixes: db37bc177dae ("net/funeth: add the data path")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Dimitris Michailidis <dmichail@fungible.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
        int cpu, res;
 
        cpu = cpumask_local_spread(idx, node);
-       node = local_memory_node(cpu_to_node(cpu));
+       node = cpu_to_mem(cpu);
 
        irq = kzalloc_node(sizeof(*irq), GFP_KERNEL, node);
        if (!irq)
 
 
 static inline int fun_irq_node(const struct fun_irq *p)
 {
-       return local_memory_node(cpu_to_node(cpumask_first(&p->affinity_mask)));
+       return cpu_to_mem(cpumask_first(&p->affinity_mask));
 }
 
 int fun_rxq_napi_poll(struct napi_struct *napi, int budget);