[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190228212312.GI4359@kwain>
Date: Thu, 28 Feb 2019 22:23:12 +0100
From: Antoine Tenart <antoine.tenart@...tlin.com>
To: David Miller <davem@...emloft.net>
Cc: antoine.tenart@...tlin.com, linux@...linux.org.uk,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, maxime.chevallier@...tlin.com,
gregory.clement@...tlin.com, miquel.raynal@...tlin.com,
nadavh@...vell.com, stefanc@...vell.com, ymarkman@...vell.com,
mw@...ihalf.com
Subject: Re: [PATCH net-next 14/15] net: mvpp2: set the XPCS and MPCS in
reset when not used
Hi David,
On Thu, Feb 28, 2019 at 10:40:51AM -0800, David Miller wrote:
> From: Antoine Tenart <antoine.tenart@...tlin.com>
> 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
Powered by blists - more mailing lists