linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: yuval.shaia@oracle.com (Yuval Shaia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net/{mii,smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void
Date: Sun, 4 Jun 2017 22:49:06 +0300	[thread overview]
Message-ID: <20170604194905.GA7045@yuvallap> (raw)
In-Reply-To: <20170604190133.GB10273@lunn.ch>

On Sun, Jun 04, 2017 at 09:01:33PM +0200, Andrew Lunn wrote:
> > diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
> > index da02041..017f48c 100644
> > --- a/drivers/net/cris/eth_v10.c
> > +++ b/drivers/net/cris/eth_v10.c
> > @@ -1417,10 +1417,9 @@ static int e100_get_link_ksettings(struct net_device *dev,
> >  {
> >  	struct net_local *np = netdev_priv(dev);
> >  	u32 supported;
> > -	int err;
> >  
> >  	spin_lock_irq(&np->lock);
> > -	err = mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
> > +	mii_ethtool_get_link_ksettings(&np->mii_if, cmd);
> >  	spin_unlock_irq(&np->lock);
> >  
> >  	/* The PHY may support 1000baseT, but the Etrax100 does not.  */
> > @@ -1432,7 +1431,7 @@ static int e100_get_link_ksettings(struct net_device *dev,
> >  	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
> >  						supported);
> >  
> > -	return err;
> > +	return 0;
> >  }
> 
> How far are going planning on going? It seems like
> *_get_link_ksettings() now all return a useless 0. Do you plan to
> change ethtool_ops and make if void all the way up?

It is not always correct, see for example how xgene_get_link_ksettings
returns non-zero value so i assume that ethtool_ops should remain as it is.
Also, looking at ethtool_get_settings it seems that returned value is
checked.

> 
>        Andrew

  reply	other threads:[~2017-06-04 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-04 17:22 [PATCH] net/{mii, smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void Yuval Shaia
2017-06-04 19:01 ` [PATCH] net/{mii,smsc}: " Andrew Lunn
2017-06-04 19:49   ` Yuval Shaia [this message]
2017-06-05 15:01 ` David Miller

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=20170604194905.GA7045@yuvallap \
    --to=yuval.shaia@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).