* [PATCH net-next] net: asix: change the type of asix_set_sw/hw_mii to static
@ 2022-07-04 12:34 Zhengchao Shao
2022-07-06 2:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Zhengchao Shao @ 2022-07-04 12:34 UTC (permalink / raw)
To: linux-kernel, netdev, linux-usb, davem, edumazet, kuba, pabeni,
paskripkin, linux, andrew
Cc: weiyongjun1, yuehaibing, shaozhengchao
The functions of asix_set_sw/hw_mii are not called in other files, so
change them to static.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
---
drivers/net/usb/asix.h | 3 ---
drivers/net/usb/asix_common.c | 40 ++++++++++++++++++-----------------
2 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
index 2c81236c6c7c..02d4096a9c9d 100644
--- a/drivers/net/usb/asix.h
+++ b/drivers/net/usb/asix.h
@@ -213,9 +213,6 @@ void asix_rx_fixup_common_free(struct asix_common_private *dp);
struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
gfp_t flags);
-int asix_set_sw_mii(struct usbnet *dev, int in_pm);
-int asix_set_hw_mii(struct usbnet *dev, int in_pm);
-
int asix_read_phy_addr(struct usbnet *dev, bool internal);
int asix_sw_reset(struct usbnet *dev, u8 flags, int in_pm);
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 632fa6c1d5e3..0c3a4d3d164f 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -68,6 +68,27 @@ void asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index,
value, index, data, size);
}
+static int asix_set_sw_mii(struct usbnet *dev, int in_pm)
+{
+ int ret;
+
+ ret = asix_write_cmd(dev, AX_CMD_SET_SW_MII, 0x0000, 0, 0, NULL, in_pm);
+
+ if (ret < 0)
+ netdev_err(dev->net, "Failed to enable software MII access\n");
+ return ret;
+}
+
+static int asix_set_hw_mii(struct usbnet *dev, int in_pm)
+{
+ int ret;
+
+ ret = asix_write_cmd(dev, AX_CMD_SET_HW_MII, 0x0000, 0, 0, NULL, in_pm);
+ if (ret < 0)
+ netdev_err(dev->net, "Failed to enable hardware MII access\n");
+ return ret;
+}
+
static int asix_check_host_enable(struct usbnet *dev, int in_pm)
{
int i, ret;
@@ -297,25 +318,6 @@ struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
return skb;
}
-int asix_set_sw_mii(struct usbnet *dev, int in_pm)
-{
- int ret;
- ret = asix_write_cmd(dev, AX_CMD_SET_SW_MII, 0x0000, 0, 0, NULL, in_pm);
-
- if (ret < 0)
- netdev_err(dev->net, "Failed to enable software MII access\n");
- return ret;
-}
-
-int asix_set_hw_mii(struct usbnet *dev, int in_pm)
-{
- int ret;
- ret = asix_write_cmd(dev, AX_CMD_SET_HW_MII, 0x0000, 0, 0, NULL, in_pm);
- if (ret < 0)
- netdev_err(dev->net, "Failed to enable hardware MII access\n");
- return ret;
-}
-
int asix_read_phy_addr(struct usbnet *dev, bool internal)
{
int ret, offset;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: asix: change the type of asix_set_sw/hw_mii to static
2022-07-04 12:34 [PATCH net-next] net: asix: change the type of asix_set_sw/hw_mii to static Zhengchao Shao
@ 2022-07-06 2:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-06 2:00 UTC (permalink / raw)
To: shaozhengchao
Cc: linux-kernel, netdev, linux-usb, davem, edumazet, kuba, pabeni,
paskripkin, linux, andrew, weiyongjun1, yuehaibing
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 4 Jul 2022 20:34:48 +0800 you wrote:
> The functions of asix_set_sw/hw_mii are not called in other files, so
> change them to static.
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
> drivers/net/usb/asix.h | 3 ---
> drivers/net/usb/asix_common.c | 40 ++++++++++++++++++-----------------
> 2 files changed, 21 insertions(+), 22 deletions(-)
Here is the summary with links:
- [net-next] net: asix: change the type of asix_set_sw/hw_mii to static
https://git.kernel.org/netdev/net-next/c/7e40e16e38ba
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-06 2:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 12:34 [PATCH net-next] net: asix: change the type of asix_set_sw/hw_mii to static Zhengchao Shao
2022-07-06 2:00 ` patchwork-bot+netdevbpf
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).