On Sat, Jun 12, 2021 at 12:02 PM Ramon Fried <[email protected]> wrote: > > Hi Tim. > The patch fails build in several boards (Malta variants): > > +cmd/net.c: In function 'do_net_list': > 42+cmd/net.c:487:34: error: initialization of 'const struct udevice *' > from incompatible pointer type 'struct eth_device *' > [-Werror=incompatible-pointer-types] > 43+ 487 | const struct udevice *current = eth_get_dev(); > 44+ | ^~~~~~~~~~~ >
Ramon, Looks like my patch only works for DM_ETH. If I were to implement this for legacy eth it would probably be a mess as the device list is a static struct in net/eth_legacy.c. I'm not sure how to tell how many boards are out there that are not yet converted to DM_ETH and am not sure when legacy eth goes away. How about if I just add #ifdef CONFIG_DM_ETH around the whole thing and it isn't supported for legacy eth? Best Regards, Tim

