netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Simon Horman" <horms+renesas@verge.net.au>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available
Date: Fri, 8 Dec 2017 16:36:21 +0100	[thread overview]
Message-ID: <20171208163621.0c8f4e7d@windsurf.lan> (raw)
In-Reply-To: <efb99078-3156-666b-0b7e-6c2d1976c89f@cogentembedded.com>

Hello,

On Tue, 5 Dec 2017 22:02:20 +0300, Sergei Shtylyov wrote:

> > +	/* mask with MAC supported features */
> > +	if (mdp->cd->register_type != SH_ETH_REG_GIGABIT) {
> > +		err = phy_set_max_speed(phydev, SPEED_100);
> > +		if (err) {
> > +			netdev_err(ndev, "failed to limit PHY to 100 Mbit/s\n");
> > +			goto err_phy_disconnect;  
> 
>     Er, why do we need a *goto* here at all? Just call phy_disconnect() here 
> and be done with that...

Thanks for the feedback, I've sent a v3 that takes into account this
comment.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

      reply	other threads:[~2017-12-08 15:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05  9:29 [PATCH v2] net: sh_eth: do not advertise Gigabit capabilities when not available Thomas Petazzoni
2017-12-05 17:55 ` Andrew Lunn
2017-12-05 19:02 ` Sergei Shtylyov
2017-12-08 15:36   ` Thomas Petazzoni [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=20171208163621.0c8f4e7d@windsurf.lan \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=davem@davemloft.net \
    --cc=geert+renesas@glider.be \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=sergei.shtylyov@cogentembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).