From: Bernhard Nortmann Date: Fri, 12 Jun 2015 18:26:48 +0000 (UTC) Subject: [U-Boot] [RFC] sunxi: driver model breaks netconsole Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The switch to DM in http://git.denx.de/?p=u-boot.git;a=commit;h=b6006baf9c2553543e3384983d23d95efbf24fa6 causes u-boot compilation to fail when CONFIG_NETCONSOLE is enabled: CC common/bootm.o common/bootm.c: In function 'bootm_disable_interrupts': common/bootm.c:472:2: warning: implicit declaration of function 'eth_unregister' [-Wimplicit-function-declaration] eth_unregister(eth_get_dev()); ^ drivers/net/netconsole.c: In function 'nc_send_packet': drivers/net/netconsole.c:181:6: warning: assignment from incompatible pointer type [enabled by default] eth = eth_get_dev(); ^ CC drivers/net/netconsole.o drivers/net/netconsole.c:186:10: error: dereferencing pointer to incomplete type if (eth->state == ETH_STATE_ACTIVE) ^ drivers/net/netconsole.c:197:9: error: dereferencing pointer to incomplete type if (eth->state != ETH_STATE_ACTIVE) { ^ drivers/net/netconsole.c: In function 'nc_stdio_tstc': drivers/net/netconsole.c:303:6: warning: assignment from incompatible pointer type [enabled by default] eth = eth_get_dev(); ^ drivers/net/netconsole.c:304:16: error: dereferencing pointer to incomplete type if (eth && eth->state == ETH_STATE_ACTIVE) ^ scripts/Makefile.build:276: recipe for target 'drivers/net/netconsole.o' failed make[1]: *** [drivers/net/netconsole.o] Error 1 Makefile:1156: recipe for target 'drivers/net' failed I suspect that netconsole.c needs to be reworked, and this problem might affect other platforms than sunxi, too. Regards, B. Nortmann