From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] net: mv643xx_eth: Simplify mv643xx_eth_adjust_link()
Date: Sun, 04 May 2014 23:23:05 +0200 [thread overview]
Message-ID: <5366AFB9.3010603@gmail.com> (raw)
In-Reply-To: <1399141622-30654-2-git-send-email-ezequiel.garcia@free-electrons.com>
On 05/03/2014 08:26 PM, Ezequiel Garcia wrote:
> Currently, mv643xx_eth_adjust_link() is only used to call mv643xx_adjust_pscr().
> This commit renames the latter to the former, and therefore removes the extra
> and useless function.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thanks!
> ---
> drivers/net/ethernet/marvell/mv643xx_eth.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
> index b7b8d74..1e63c63 100644
> --- a/drivers/net/ethernet/marvell/mv643xx_eth.c
> +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
> @@ -1010,8 +1010,10 @@ static void txq_set_fixed_prio_mode(struct tx_queue *txq)
>
>
> /* mii management interface *************************************************/
> -static void mv643xx_adjust_pscr(struct mv643xx_eth_private *mp)
> +static void mv643xx_eth_adjust_link(struct net_device *dev)
> {
> + struct mv643xx_eth_private *mp = netdev_priv(dev);
> +
> u32 pscr = rdlp(mp, PORT_SERIAL_CONTROL);
> u32 autoneg_disable = FORCE_LINK_PASS |
> DISABLE_AUTO_NEG_SPEED_GMII |
> @@ -1387,7 +1389,7 @@ mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>
> ret = phy_ethtool_sset(mp->phy, cmd);
> if (!ret)
> - mv643xx_adjust_pscr(mp);
> + mv643xx_eth_adjust_link(dev);
> return ret;
> }
>
> @@ -2303,7 +2305,7 @@ static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>
> ret = phy_mii_ioctl(mp->phy, ifr, cmd);
> if (!ret)
> - mv643xx_adjust_pscr(mp);
> + mv643xx_eth_adjust_link(dev);
> return ret;
> }
>
> @@ -2701,13 +2703,6 @@ static void set_params(struct mv643xx_eth_private *mp,
> mp->txq_count = pd->tx_queue_count ? : 1;
> }
>
> -static void mv643xx_eth_adjust_link(struct net_device *dev)
> -{
> - struct mv643xx_eth_private *mp = netdev_priv(dev);
> -
> - mv643xx_adjust_pscr(mp);
> -}
> -
> static struct phy_device *phy_scan(struct mv643xx_eth_private *mp,
> int phy_addr)
> {
>
WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
Willy Tarreau <w@1wt.eu>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jason Cooper <jason@lakedaemon.net>,
Gregory Clement <gregory.clement@free-electrons.com>,
Andrew Lunn <andrew@lunn.ch>, Tawfik Bayouk <tawfik@marvell.com>,
Lior Amsalem <alior@marvell.com>
Subject: Re: [PATCH 1/7] net: mv643xx_eth: Simplify mv643xx_eth_adjust_link()
Date: Sun, 04 May 2014 23:23:05 +0200 [thread overview]
Message-ID: <5366AFB9.3010603@gmail.com> (raw)
In-Reply-To: <1399141622-30654-2-git-send-email-ezequiel.garcia@free-electrons.com>
On 05/03/2014 08:26 PM, Ezequiel Garcia wrote:
> Currently, mv643xx_eth_adjust_link() is only used to call mv643xx_adjust_pscr().
> This commit renames the latter to the former, and therefore removes the extra
> and useless function.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Thanks!
> ---
> drivers/net/ethernet/marvell/mv643xx_eth.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
> index b7b8d74..1e63c63 100644
> --- a/drivers/net/ethernet/marvell/mv643xx_eth.c
> +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
> @@ -1010,8 +1010,10 @@ static void txq_set_fixed_prio_mode(struct tx_queue *txq)
>
>
> /* mii management interface *************************************************/
> -static void mv643xx_adjust_pscr(struct mv643xx_eth_private *mp)
> +static void mv643xx_eth_adjust_link(struct net_device *dev)
> {
> + struct mv643xx_eth_private *mp = netdev_priv(dev);
> +
> u32 pscr = rdlp(mp, PORT_SERIAL_CONTROL);
> u32 autoneg_disable = FORCE_LINK_PASS |
> DISABLE_AUTO_NEG_SPEED_GMII |
> @@ -1387,7 +1389,7 @@ mv643xx_eth_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
>
> ret = phy_ethtool_sset(mp->phy, cmd);
> if (!ret)
> - mv643xx_adjust_pscr(mp);
> + mv643xx_eth_adjust_link(dev);
> return ret;
> }
>
> @@ -2303,7 +2305,7 @@ static int mv643xx_eth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
>
> ret = phy_mii_ioctl(mp->phy, ifr, cmd);
> if (!ret)
> - mv643xx_adjust_pscr(mp);
> + mv643xx_eth_adjust_link(dev);
> return ret;
> }
>
> @@ -2701,13 +2703,6 @@ static void set_params(struct mv643xx_eth_private *mp,
> mp->txq_count = pd->tx_queue_count ? : 1;
> }
>
> -static void mv643xx_eth_adjust_link(struct net_device *dev)
> -{
> - struct mv643xx_eth_private *mp = netdev_priv(dev);
> -
> - mv643xx_adjust_pscr(mp);
> -}
> -
> static struct phy_device *phy_scan(struct mv643xx_eth_private *mp,
> int phy_addr)
> {
>
next prev parent reply other threads:[~2014-05-04 21:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-03 18:26 [PATCH 0/7] net: ethernet: marvell: Assorted fixes Ezequiel Garcia
2014-05-03 18:26 ` Ezequiel Garcia
2014-05-03 18:26 ` [PATCH 1/7] net: mv643xx_eth: Simplify mv643xx_eth_adjust_link() Ezequiel Garcia
2014-05-03 18:26 ` Ezequiel Garcia
2014-05-04 21:23 ` Sebastian Hesselbarth [this message]
2014-05-04 21:23 ` Sebastian Hesselbarth
2014-05-05 19:40 ` David Miller
2014-05-05 19:40 ` David Miller
2014-05-06 16:17 ` Ezequiel Garcia
2014-05-06 16:17 ` Ezequiel Garcia
2014-05-03 18:26 ` [PATCH 2/7] net: mvneta: Clean-up mvneta_tx_frag_process() Ezequiel Garcia
2014-05-03 18:26 ` Ezequiel Garcia
2014-05-03 18:26 ` [PATCH 3/7] net: mvneta: Check tx queue setup error in mvneta_change_mtu() Ezequiel Garcia
2014-05-03 18:26 ` Ezequiel Garcia
2014-05-03 18:26 ` [PATCH 4/7] net: mvneta: Clean-up mvneta_init() Ezequiel Garcia
2014-05-03 18:26 ` Ezequiel Garcia
2014-05-03 18:27 ` [PATCH 5/7] net: mvneta: Use prepare/commit API to simplify MAC address setting Ezequiel Garcia
2014-05-03 18:27 ` Ezequiel Garcia
2014-05-03 18:27 ` [PATCH 6/7] net: mvneta: Change the number of default rx queues to one Ezequiel Garcia
2014-05-03 18:27 ` Ezequiel Garcia
2014-05-03 18:27 ` [PATCH 7/7] net: mvmdio: Use devm_* API to simplify the code Ezequiel Garcia
2014-05-03 18:27 ` Ezequiel Garcia
2014-05-04 21:24 ` Sebastian Hesselbarth
2014-05-04 21:24 ` Sebastian Hesselbarth
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=5366AFB9.3010603@gmail.com \
--to=sebastian.hesselbarth@gmail.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 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.