Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp1308511pxy; Sun, 15 Aug 2021 17:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoLarFegdAoVfWsHLDzec5WFe71XPD8+6VTBQvasSe1uPxFq1stonYEL0yzxCXO/dJY/VC X-Received: by 2002:a92:c60d:: with SMTP id p13mr9921815ilm.8.1629072611644; Sun, 15 Aug 2021 17:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629072611; cv=none; d=google.com; s=arc-20160816; b=HI5XE2ZP2wQjo8q9oqarVlk6+t0EkcmYVxPg0oGfNA1mvEbVxctQMgBrMH7M1IuXNe PoaOog5Bizm9zUrmIONN4paTGp9ue3C0sLz731bqFLHiO3pejLExtjEfAppbi6zsF3Pi Ye2KhMsj10smW+5kT2vJbXbfn8nFWiNRqu0g5LsCo3gPCEhiveYfTw6H/WpNXA/ZDAE6 FKF7t4iN2nAlwru+5WiwBu2NYd8L4zuSdd2/XvEua2vGGxAp4uea1CQj9JsZ5Zs6YMiQ 5JIs1aSwaX2gdqI1PXC4Sr/mNSk58TvsSm4UmFqeb6+Jwuy0A0pQiJO16ljtC96AYUps pzxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cfAWkMGWzzkKs9mNad95sbUPUcyj83ADf+VQ53dAXuM=; b=az3KSiClI2xtIgKkDSXmJgBV5RRHBhP16nyO2DYYp39+Kcut9NXASC0ILz0nHVn+9W LsCW+L5ZvUSDgSNQu2ZjjLCxz9iXdVvooS+hfpxxn+RAz62KQOVtMD/ZtcBUdgN58l6Z /adFZO5jj5lXbN0QPKsxoA1t7KiQt8hSCGJrk8alxVAQT3dtevpA/Av6XpIF3LspR3Am Fhr2DgumC+uvv5uY2d/CfCRmE4dsxvqi2GD7FYEyns+JOEtjCixPqrTEQEzM2wIQ3wYC 1mfjZwKetrUWxZs8Hhvhxpu9yiDgL/HnPz9rhbeXZdwr2usKzhyLwGcoIvQNwZz98fhn Owqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=P0dk3kQ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si10566365ilo.5.2021.08.15.17.10.01; Sun, 15 Aug 2021 17:10:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=P0dk3kQ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232173AbhHPAGZ (ORCPT + 99 others); Sun, 15 Aug 2021 20:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbhHPAGZ (ORCPT ); Sun, 15 Aug 2021 20:06:25 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4799DC0613CF; Sun, 15 Aug 2021 17:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cfAWkMGWzzkKs9mNad95sbUPUcyj83ADf+VQ53dAXuM=; b=P0dk3kQ4dltUXGzd1kFWtlKg4 OsnZXRoefVF93mY0eaNCldR/ZRutYSgAWzlkSvvuhA1CumO+vrZxW7LD5LVelHEke26SRA8+xco1p VCT9Eex8mYYQxF5oe2U605vGlfNmhEwbUQNUBQQgRFHA1y5u0ucmnrozZLPkp8MGmITN4DdvuZUHP xShrhBFdJbjodBQ0zryPhhiQIIG4npAmIrAilZgUzXP8+DwnA76J8aobzR+wUSp/4M/SghZwVTVQi elTJWYLFWXSJRnPZSHHQDyvVcazupLElpY1FyWXRaggQCySKxG3NvkFiePr5UpQqo/kCkFOMZb8qX jvrXxJuWg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:47344) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFQ8S-0006wu-6p; Mon, 16 Aug 2021 01:05:48 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1mFQ8R-0007Qe-2s; Mon, 16 Aug 2021 01:05:47 +0100 Date: Mon, 16 Aug 2021 01:05:47 +0100 From: "Russell King (Oracle)" To: Colin Foster Cc: Vladimir Oltean , andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, claudiu.manoil@nxp.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, hkallweit1@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v3 net-next 09/10] net: dsa: ocelot: felix: add support for VSC75XX control over SPI Message-ID: <20210816000546.GE22278@shell.armlinux.org.uk> References: <20210814025003.2449143-1-colin.foster@in-advantage.com> <20210814025003.2449143-10-colin.foster@in-advantage.com> <20210814114329.mycpcfwoqpqxzsyl@skbuf> <20210814120211.v2qjqgi6l3slnkq2@skbuf> <20210815204149.GB3328995@euler> <20210815231454.GD22278@shell.armlinux.org.uk> <20210815232753.GA3526284@euler> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210815232753.GA3526284@euler> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 15, 2021 at 04:27:53PM -0700, Colin Foster wrote: > On Mon, Aug 16, 2021 at 12:14:54AM +0100, Russell King (Oracle) wrote: > > > diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c > > > index a84129d18007..d0b3f6be360f 100644 > > > --- a/drivers/net/dsa/ocelot/felix_vsc9959.c > > > +++ b/drivers/net/dsa/ocelot/felix_vsc9959.c > > > @@ -1046,7 +1046,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) > > > int rc; > > > > > > felix->pcs = devm_kcalloc(dev, felix->info->num_ports, > > > - sizeof(struct lynx_pcs *), > > > + sizeof(struct phylink_pcs *), > > > GFP_KERNEL); > > > if (!felix->pcs) { > > > dev_err(dev, "failed to allocate array for PCS PHYs\n"); > > > @@ -1095,8 +1095,8 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) > > > > > > for (port = 0; port < felix->info->num_ports; port++) { > > > struct ocelot_port *ocelot_port = ocelot->ports[port]; > > > + struct phylink_pcs *phylink; > > > struct mdio_device *pcs; > > > - struct lynx_pcs *lynx; > > > > Normally, "phylink" is used to refer to the main phylink data > > structure, so I'm not too thrilled to see it getting re-used for the > > PCS. However, as you have a variable called "pcs" already, I suppose > > you don't have much choice. > > > > That said, it would be nice to have consistent naming through at > > least a single file, and you do have "pcs" below to refer to this > > same thing. > > > > Maybe using plpcs or ppcs would suffice? Or maybe use the "long name" > > of phylink_pcs ? > > I noticed this as well. It seems to me like the mdio_device variable > name of pcs is misleading, and perhaps should be "mdio" and phylink_pcs > should be pcs, or any of the alternatives you suggested. Yes, we could alternatively could use mdiodev for mdio devices, which would free up "pcs" for use with struct phylink_pcs. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!