From patchwork Mon Feb 8 06:28:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12074091 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,TVD_SUBJ_WIPE_DEBT, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3686EC433DB for ; Mon, 8 Feb 2021 06:31:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CCB1764DD6 for ; Mon, 8 Feb 2021 06:31:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbhBHGar (ORCPT ); Mon, 8 Feb 2021 01:30:47 -0500 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:41913 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbhBHGaK (ORCPT ); Mon, 8 Feb 2021 01:30:10 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id DAD97580218; Mon, 8 Feb 2021 01:29:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 08 Feb 2021 01:29:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=T1+J0aCgQkzwe JaAMrWxKE3uyhlZOFmpO4MFCRMyHkA=; b=DPQZimSHHsLfHQ2hQj/iLuW4PrQxX J/qbq/qWtejw03wpEh8FKYWx1ZlrKa37WPXzeHF+xik81sdOwN64LPLBQDMZDScg q4kXOWJOBYhNooYsG+4Vdpp5F6Escsai8h9iurl2ua5AjTNN+YLEucAHTecGY913 iGCcdOsOjf0jRZq4yMCSjd/tIyOahX160zT/QhzqtCox/EYITsMVbF/QOCQd8SZW 8lZIs72KRENWXj6Gg7CHAtZeeA39XbbpLfbFdtleQSyrCB/18nYYEsJsDH5Drm0g 0+SUVpovsaGmklWIT2FK+eUTJ2Y0WKgX/sK0RHa2TpgZ7sL13zKlUlGcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=T1+J0aCgQkzweJaAMrWxKE3uyhlZOFmpO4MFCRMyHkA=; b=n6yPfuYD rF9T3VZJ46HKecWAilk+3dNBSleZ+wS2Lr/NGycHOfGgSYbRDFT9o/kgYjaUD4JN jYLCumqMSpDixF1jok6vCXUZCERoQmcOTCNFM1h3qsQOy5sCoScvI8dLLQihMCqG 6bxPLjK+EipXsiJwDaJ6Ec3UCak1S61pwZEU+k8t1qeEUFPJHM1M5TwYUZ4y4s6T Ew5VYN8Nw9HP7UBATlT7SpZGJGDChTroR9ttft3GMx1sfHD6E8xeslzF7r+s7x8L nfFz5n1EF7Dz/FWE8mW3vDZXEGhqidR60U0PYJxVRl0SvQdPioYS9bDJYCaxmZtv LoYNDAi6TQHrZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrhedvgdelgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecukfhppeejtddrudefhedrudegkedrudehudenucevlhhushhtvghrufhiii gvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 2F20B1080063; Mon, 8 Feb 2021 01:29:02 -0500 (EST) From: Samuel Holland To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Jakub Kicinski , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Corentin Labbe Cc: Ondrej Jirman , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Samuel Holland Subject: [PATCH net-next RESEND 2/5] net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check Date: Mon, 8 Feb 2021 00:28:56 -0600 Message-Id: <20210208062859.11429-4-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210208062859.11429-1-samuel@sholland.org> References: <20210208062859.11429-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.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 Signed-off-by: Samuel Holland --- 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 8e505019adf8..3c3d0b99d3e8 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);