On 08/17/2017 02:57 PM, Oliver Hartkopp wrote: > Hi Marc, > > On 08/17/2017 01:57 PM, Marc Kleine-Budde wrote: > >> >> Have you found some time to look at these issues? >> > > I'm going through the code just now ;-) > > One question: > > All the midlayer private stuff was also done to cleanly separate the > network layer stuff in net/can from the driver layer stuff in > drivers/net/can. > > Now you introduce a network layer data structure into the driver layer. > I'm not against this - and in fact I can see a bunch of advantages and > simplifications as you intended. > But do you think it's a proper approach from the perspective of layer > separation? No. Another approach is keep the memory allocation in the NETDEV_REGISTER hook, but refuse to start the netdev with NOTIFY_DONE. Then we can skip all the NULL pointer checks, too. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |