All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	Mark Einon <mark.einon@gmail.com>,
	Jay Cliburn <jcliburn@gmail.com>,
	Chris Snook <chris.snook@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 1/3] net: phy: rename phy_do_ioctl to phy_do_ioctl_running
Date: Mon, 20 Jan 2020 22:16:07 +0100	[thread overview]
Message-ID: <b2117c4e-c440-83da-7f73-0ddd3e6887fe@gmail.com> (raw)
In-Reply-To: <a7a6dc1f-b4d4-e36f-7408-31e4715d947f@gmail.com>

We just added phy_do_ioctl, but it turned out that we need another
version of this function that doesn't check whether net_device is
running. So rename phy_do_ioctl to phy_do_ioctl_running.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 drivers/net/phy/phy.c                     | 6 +++---
 include/linux/phy.h                       | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 175f951b6..7a5fe1137 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5158,7 +5158,7 @@ static const struct net_device_ops rtl_netdev_ops = {
 	.ndo_fix_features	= rtl8169_fix_features,
 	.ndo_set_features	= rtl8169_set_features,
 	.ndo_set_mac_address	= rtl_set_mac_address,
-	.ndo_do_ioctl		= phy_do_ioctl,
+	.ndo_do_ioctl		= phy_do_ioctl_running,
 	.ndo_set_rx_mode	= rtl_set_rx_mode,
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= rtl8169_netpoll,
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index da05b3480..cf25fa3be 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -433,19 +433,19 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd)
 EXPORT_SYMBOL(phy_mii_ioctl);
 
 /**
- * phy_do_ioctl - generic ndo_do_ioctl implementation
+ * phy_do_ioctl_running - generic ndo_do_ioctl implementation
  * @dev: the net_device struct
  * @ifr: &struct ifreq for socket ioctl's
  * @cmd: ioctl cmd to execute
  */
-int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd)
 {
 	if (!netif_running(dev) || !dev->phydev)
 		return -ENODEV;
 
 	return phy_mii_ioctl(dev->phydev, ifr, cmd);
 }
-EXPORT_SYMBOL(phy_do_ioctl);
+EXPORT_SYMBOL(phy_do_ioctl_running);
 
 void phy_queue_state_machine(struct phy_device *phydev, unsigned long jiffies)
 {
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 996c4df11..28e8d8102 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1231,7 +1231,7 @@ void phy_ethtool_ksettings_get(struct phy_device *phydev,
 int phy_ethtool_ksettings_set(struct phy_device *phydev,
 			      const struct ethtool_link_ksettings *cmd);
 int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd);
-int phy_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
+int phy_do_ioctl_running(struct net_device *dev, struct ifreq *ifr, int cmd);
 void phy_request_interrupt(struct phy_device *phydev);
 void phy_free_interrupt(struct phy_device *phydev);
 void phy_print_status(struct phy_device *phydev);
-- 
2.25.0



  reply	other threads:[~2020-01-20 21:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20 21:15 [PATCH net-next 0/3] net: phy: add new version of phy_do_ioctl and convert suitable drivers Heiner Kallweit
2020-01-20 21:16 ` Heiner Kallweit [this message]
2020-01-20 22:03   ` [PATCH net-next 1/3] net: phy: rename phy_do_ioctl to phy_do_ioctl_running Florian Fainelli
2020-01-20 22:16   ` Andrew Lunn
2020-01-20 21:17 ` [PATCH net-next 2/3] net: phy: add new version of phy_do_ioctl Heiner Kallweit
2020-01-20 22:04   ` Florian Fainelli
2020-01-20 22:17   ` Andrew Lunn
2020-01-20 21:18 ` [PATCH net-next 3/3] net: convert suitable network drivers to use phy_do_ioctl Heiner Kallweit
2020-01-20 22:04   ` Florian Fainelli
2020-01-20 22:19   ` Andrew Lunn
2020-01-20 22:05 ` [PATCH net-next 0/3] net: phy: add new version of phy_do_ioctl and convert suitable drivers Florian Fainelli
2020-01-21  9:50 ` 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=b2117c4e-c440-83da-7f73-0ddd3e6887fe@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=chris.snook@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=jcliburn@gmail.com \
    --cc=mark.einon@gmail.com \
    --cc=netdev@vger.kernel.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.