Thread (12 messages) 12 messages, 5 authors, 2021-04-28

Re: [PATCH net-next v4 2/2] of: net: fix of_get_mac_addr_nvmem() for non-platform devices

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2021-04-27 00:04:57
Also in: linux-amlogic, linux-devicetree, linux-mediatek, linux-omap, linux-renesas-soc, linux-staging, linux-wireless, linuxppc-dev, lkml

On Mon, 2021-04-26 at 12:54 +0200, Michael Walle wrote:
Before I'll try to come up with a patch for this, I'd like to get
your opinion on it.

(1) replacing of_get_mac_address(node) with eth_get_mac_address(dev)
     might sometimes lead to confusing comments like in
     drivers/net/ethernet/allwinner/sun4i-emac.c:

     /* Read MAC-address from DT */
     ret = of_get_mac_address(np, ndev->dev_addr);
You could leave it or turn it into "from platform", doesn't matter...
(2) What do you think of eth_get_mac_address(ndev). That is, the
Not sure what you mean, eth_platform_get_mac_address() takes the
address as an argument. I think what you want is a consolidated
nvmem_get_mac_address + eth_platform_get_mac_address that takes a
device, which would have no requirement of the bus_type at all.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help