All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Behun <marek.behun@nic.cz>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Vivien Didelot <vivien.didelot@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: check for mode change in port_setup_mac
Date: Tue, 13 Aug 2019 22:45:02 +0200	[thread overview]
Message-ID: <20190813224502.5a083d77@nic.cz> (raw)
In-Reply-To: <20190813203234.GO15047@lunn.ch>

On Tue, 13 Aug 2019 22:32:34 +0200
Andrew Lunn <andrew@lunn.ch> wrote:

> On Tue, Aug 13, 2019 at 07:12:43PM +0200, Marek Behún wrote:
> > @@ -598,12 +599,49 @@ int mv88e6352_port_link_state(struct mv88e6xxx_chip *chip, int port,
> >  			      struct phylink_link_state *state)
> >  {
> >  	int err;
> > -	u16 reg;
> > +	u16 reg, mac;
> >  
> >  	err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, &reg);
> >  	if (err)
> >  		return err;
> 
> Hi Marek
> 
> It seems a bit off putting this block of code here, after reading
> MV88E6XXX_PORT_STS but before using the value. You don't need STS to
> determine the interface mode.
> 
> If you keep the code together, you can then reuse reg, rather than add
> mac.
> 
> Apart from that, this looks O.K.
> 
>       Andrew

Hi Andrew,
you are right, I shall rewrite this.
Thank you.
Marek

      reply	other threads:[~2019-08-13 20:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 17:12 [PATCH net-next] net: dsa: mv88e6xxx: check for mode change in port_setup_mac Marek Behún
2019-08-13 20:32 ` Andrew Lunn
2019-08-13 20:45   ` Marek Behun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190813224502.5a083d77@nic.cz \
    --to=marek.behun@nic.cz \
    --cc=andrew@lunn.ch \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.