Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754852AbdDLRPY (ORCPT ); Wed, 12 Apr 2017 13:15:24 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:48194 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbdDLRPW (ORCPT ); Wed, 12 Apr 2017 13:15:22 -0400 Date: Wed, 12 Apr 2017 13:15:20 -0400 (EDT) Message-Id: <20170412.131520.2000433123223699514.davem@davemloft.net> To: jbe@pengutronix.de Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, f.fainelli@gmail.com, kernel@pengutronix.de, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com Subject: Re: [PATCHv4] net: dsa: add SMSC/Microchip LAN9303 three port ethernet switch driver From: David Miller In-Reply-To: <20170412.120446.1436199142955903765.davem@davemloft.net> References: <20170412140218.1076-1-jbe@pengutronix.de> <20170412.120446.1436199142955903765.davem@davemloft.net> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 12 Apr 2017 09:34:02 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3CHFY4c005011 Content-Length: 4185 Lines: 83 From: David Miller Date: Wed, 12 Apr 2017 12:04:46 -0400 (EDT) > From: Juergen Borleis > Date: Wed, 12 Apr 2017 16:02:14 +0200 > >> The LAN9303 is a three port 10/100 ethernet switch with integrated phys >> for the two external ethernet ports. The third port is an RMII/MII >> interface to a host master network interface (e.g. fixed link). >> >> While the LAN9303 device itself supports offload packet processing, this >> driver does not make use of it yet. This driver just configures the device >> to provide two separate network interfaces (which is the default state of >> a DSA device). >> >> Please note: the "MDIO managed mode" driver part isn't tested yet. I have >> used and tested the "I2C managed mode" only. > > Series applied, thank you. Actually, this doesn't even build. Please fix this and resubmit. Thank you. In file included from net/dsa/tag_lan9303.c:17:0: net/dsa/dsa_priv.h:52:16: warning: ?struct dsa_switch? declared inside parameter list struct dsa_port *dport, int port); ^ net/dsa/dsa_priv.h:52:16: warning: its scope is only this definition or declaration, which is probably not what you want net/dsa/dsa_priv.h:55:39: warning: ?struct dsa_switch? declared inside parameter list int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds); ^ net/dsa/dsa_priv.h:56:42: warning: ?struct dsa_switch? declared inside parameter list void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds); ^ net/dsa/dsa_priv.h:60:36: warning: ?struct dsa_switch? declared inside parameter list void dsa_slave_mii_bus_init(struct dsa_switch *ds); ^ net/dsa/dsa_priv.h:63:8: warning: ?struct dsa_switch? declared inside parameter list int port, const char *name); ^ net/dsa/dsa_priv.h:71:41: warning: ?struct dsa_switch? declared inside parameter list int dsa_switch_register_notifier(struct dsa_switch *ds); ^ net/dsa/dsa_priv.h:72:44: warning: ?struct dsa_switch? declared inside parameter list void dsa_switch_unregister_notifier(struct dsa_switch *ds); ^ In file included from ./include/linux/swab.h:4:0, from ./include/uapi/linux/byteorder/little_endian.h:12, from ./include/linux/byteorder/little_endian.h:4, from ./arch/x86/include/uapi/asm/byteorder.h:4, from ./include/asm-generic/bitops/le.h:5, from ./arch/x86/include/asm/bitops.h:517, from ./include/linux/bitops.h:36, from ./include/linux/kernel.h:10, from ./include/linux/skbuff.h:17, from ./include/linux/if_ether.h:23, from ./include/linux/etherdevice.h:25, from net/dsa/tag_lan9303.c:14: net/dsa/tag_lan9303.c: In function ?lan9303_xmit?: net/dsa/tag_lan9303.c:65:30: error: dereferencing pointer to incomplete type ?struct dsa_port? lan9303_tag[1] = htons(p->dp->index | BIT(4)); ^ ./include/uapi/linux/swab.h:100:54: note: in definition of macro ?__swab16? #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ ./include/linux/byteorder/generic.h:134:21: note: in expansion of macro ?__cpu_to_be16? #define ___htons(x) __cpu_to_be16(x) ^ ./include/linux/byteorder/generic.h:140:18: note: in expansion of macro ?___htons? #define htons(x) ___htons(x) ^ net/dsa/tag_lan9303.c:65:19: note: in expansion of macro ?htons? lan9303_tag[1] = htons(p->dp->index | BIT(4)); ^ net/dsa/tag_lan9303.c: In function ?lan9303_rcv?: net/dsa/tag_lan9303.c:86:10: error: dereferencing pointer to incomplete type ?struct dsa_switch_tree? ds = dst->ds[0]; ^ net/dsa/tag_lan9303.c:119:9: error: dereferencing pointer to incomplete type ?struct dsa_switch? if (!ds->ports[source_port].netdev) { ^ scripts/Makefile.build:294: recipe for target 'net/dsa/tag_lan9303.o' failed