OSDN Git Service

net/fungible: Fix local_memory_node error
authorDimitris Michailidis <d.michailidis@fungible.com>
Tue, 8 Mar 2022 04:53:21 +0000 (20:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2022 11:26:07 +0000 (11:26 +0000)
commitcdba24904e1dd4d5152c80f6f96a0ed187e7f8a4
treea265c63e54a2bb3e7c4d53bd4d0580525506f6ec
parent1330b6ef3313fcec577d2b020c290dc8b9f11f1a
net/fungible: Fix local_memory_node error

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>
drivers/net/ethernet/fungible/funeth/funeth_main.c
drivers/net/ethernet/fungible/funeth/funeth_txrx.h