From: Samuel Holland <samuel@sholland.org>
To: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@siol.net>,
Corentin Labbe <clabbe@baylibre.com>
Cc: Ondrej Jirman <megous@megous.com>,
Samuel Holland <samuel@sholland.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sunxi@googlegroups.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next v2 2/5] net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check
Date: Tue, 16 Feb 2021 22:20:03 -0600 [thread overview]
Message-ID: <20210217042006.54559-3-samuel@sholland.org> (raw)
In-Reply-To: <20210217042006.54559-1-samuel@sholland.org>
sun8i_dwmac_unpower_internal_phy already checks if the PHY is powered,
so there is no need to do it again here.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 8e505019adf85..3c3d0b99d3e8c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1018,10 +1018,8 @@ static void sun8i_dwmac_exit(struct platform_device *pdev, void *priv)
{
struct sunxi_priv_data *gmac = priv;
- if (gmac->variant->soc_has_internal_phy) {
- if (gmac->internal_phy_powered)
- sun8i_dwmac_unpower_internal_phy(gmac);
- }
+ if (gmac->variant->soc_has_internal_phy)
+ sun8i_dwmac_unpower_internal_phy(gmac);
clk_disable_unprepare(gmac->tx_clk);
--
2.26.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-17 4:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 4:20 [PATCH net-next v2 0/5] dwmac-sun8i cleanup and shutdown hook Samuel Holland
2021-02-17 4:20 ` [PATCH net-next v2 1/5] net: stmmac: dwmac-sun8i: Return void from PHY unpower Samuel Holland
2021-02-17 4:20 ` Samuel Holland [this message]
2021-02-17 4:20 ` [PATCH net-next v2 3/5] net: stmmac: dwmac-sun8i: Use reset_control_reset Samuel Holland
2021-02-17 4:20 ` [PATCH net-next v2 4/5] net: stmmac: dwmac-sun8i: Minor probe function cleanup Samuel Holland
2021-02-17 4:20 ` [PATCH net-next v2 5/5] net: stmmac: dwmac-sun8i: Add a shutdown callback Samuel Holland
2021-02-17 21:50 ` [PATCH net-next v2 0/5] dwmac-sun8i cleanup and shutdown hook patchwork-bot+netdevbpf
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=20210217042006.54559-3-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=alexandre.torgue@st.com \
--cc=clabbe@baylibre.com \
--cc=davem@davemloft.net \
--cc=jernej.skrabec@siol.net \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=megous@megous.com \
--cc=mripard@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=wens@csie.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).