Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp3991imb; Thu, 28 Feb 2019 14:09:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzOWLdWW73YhMVQGqq0cI61K67I6ad3PwkGZntqUYXKlaD4Yp3opKoV/CWQhI0ov5Gg+cV8 X-Received: by 2002:a17:902:801:: with SMTP id 1mr1649190plk.299.1551391796771; Thu, 28 Feb 2019 14:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551391796; cv=none; d=google.com; s=arc-20160816; b=OIL/OPRHQq81nMgT25ti2BcVmN0pNs6YY8jux4TdyFSJ9hHlNezR+RbrzvqzFqUwRt PCnICixvBXnWF29+ofWROyP8b8Hb1VVS1qLIAOhi0QX6vfY4k0F70YoxgRiiVdlnQJFe c3LAD9l2iyhRmd6suvBqp0bfqvfVGNUZFOb3QFlLR+D0Rd6X37RSfEiu9czBKluF10Ro 19pJ6m9CIM5l2LHYQyU44M7Rdr88btc5D0+oNempsG2C72rRBd/hH1c/2EbHcl2iNbiy BZY+Fpjxq34gzVY4erSee6zptvIdhtnCXsWTyby1v1X2eSN3Cwsn+p7eZKhzlPDoEskg eQlg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=k0ajPozyuLiiP1wNxnllOwRZ7LsHTvw7h7yKOlvuMfE=; b=Y9VDz0RJd7w0mQqbfubLXls05KYNQTIl0NSe/lo5G65n5qOCFt1KxjT9yGnH7355ZG D1tm5pv68781KsW26PUhUXZZP9U33xRhgcOGNmD/mfuOHxnwOqAeIbCPZDkyEmWgYBul guNmMv9NTT+0LjXrV4BLH2gXPkVGnGFUKAIY3MN7e1cmvQQYg2Zw8P+Xzt2g+4E3Zuml H6N9jYobnFhYFnT6Uc8vFtkiD3NjqSlh7Xt+YInRGifmmlnEny/stfjK+v6MKEeUEmW3 cgjSXzVKtC5mgciOq87P8UBezTUsLgkz/QqJOF+/h365hvBghyeEylQGQ47ZldERjOX6 37hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si18660854plq.328.2019.02.28.14.09.41; Thu, 28 Feb 2019 14:09:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729362AbfB1VXR (ORCPT + 99 others); Thu, 28 Feb 2019 16:23:17 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54101 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728045AbfB1VXQ (ORCPT ); Thu, 28 Feb 2019 16:23:16 -0500 X-Originating-IP: 90.76.143.236 Received: from localhost (lfbn-1-2078-236.w90-76.abo.wanadoo.fr [90.76.143.236]) (Authenticated sender: antoine.tenart@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1B7DCE0003; Thu, 28 Feb 2019 21:23:12 +0000 (UTC) Date: Thu, 28 Feb 2019 22:23:12 +0100 From: Antoine Tenart To: David Miller Cc: antoine.tenart@bootlin.com, linux@armlinux.org.uk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, maxime.chevallier@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com Subject: Re: [PATCH net-next 14/15] net: mvpp2: set the XPCS and MPCS in reset when not used Message-ID: <20190228212312.GI4359@kwain> References: <20190228132128.30154-1-antoine.tenart@bootlin.com> <20190228132128.30154-15-antoine.tenart@bootlin.com> <20190228.104051.1946425715498350215.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190228.104051.1946425715498350215.davem@davemloft.net> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Thu, Feb 28, 2019 at 10:40:51AM -0800, David Miller wrote: > From: Antoine Tenart > Date: Thu, 28 Feb 2019 14:21:27 +0100 > > > +static void mvpp22_pcs_reset(struct mvpp2_port *port) > > +{ > > + struct mvpp2 *priv = port->priv; > > + void __iomem *mpcs = priv->iface_base + MVPP22_MPCS_BASE(port->gop_id); > > + void __iomem *xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); > > + u32 val; > > Reverse christmas tree please. > > ... > > +static void mvpp22_pcs_unreset(struct mvpp2_port *port) > > +{ > > + struct mvpp2 *priv = port->priv; > > + void __iomem *mpcs = priv->iface_base + MVPP22_MPCS_BASE(port->gop_id); > > + void __iomem *xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); > > + u32 val; > > Likewise. Right. But here we do need priv to be assigned first in order to assign mpcs and xpcs. Do you want the pointer definition and assignment to be in two steps to respect the christmas tree rule or is it acceptable in such situations? Thanks! Antoine -- Antoine T?nart, Bootlin Embedded Linux and Kernel engineering https://bootlin.com