From mboxrd@z Thu Jan 1 00:00:00 1970 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, 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 F1B45C433E0 for ; Sun, 3 Jan 2021 11:26:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C7D7A20773 for ; Sun, 3 Jan 2021 11:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726564AbhACL0e (ORCPT ); Sun, 3 Jan 2021 06:26:34 -0500 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:49277 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbhACL0c (ORCPT ); Sun, 3 Jan 2021 06:26:32 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id B76CC52C; Sun, 3 Jan 2021 06:25:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 03 Jan 2021 06:25:46 -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=s0u0iw4NXUklB tchF6xGq/pKW5YBdSZTP5OnSimeOLk=; b=sphcgAim3lcd6mwB/ux61x4dTrkfg riL2UosJfHrVDA3nrTZm/VQByJEdHkHLF2VT0oihehi7ZTN5UBGWL0YqXaTUrdLZ pfbKkX8nJY/NQT24y/P4vOBtSaA8V5l8ab2iV0uERBTJb3QQMM6mAkj9rR2hVa/G RdsMEsPxCl1GANlkQ69/7WEW1x7HonErpGlxI5f7frgt+tI0LVGEWp/COwNYTpu1 qtJBRxxOiyhvZXkH0PXBlNCAo5Ei1JgKJhzByccJa3lic1tiCaxW9V/CYvPLvwAG Wz4naIKj/ZCKhb8zd6A675/ZNux0Epy9asxJTi2mOIgGOovKo11nJRvmg== 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= fm1; bh=s0u0iw4NXUklBtchF6xGq/pKW5YBdSZTP5OnSimeOLk=; b=VgHTlXKh p5zz+qBdWN4xn2ejP40GDXG7zn2WtPFCwSloSalpwhqtkjrVD8SWxjv/WZGPeGrS yq3Hk3o9bCXo3XFINMFswEDFZXPDAR0PEJH1dxtKHmf282nf0gBfzvEVl5VI0dre ojL/mQQDXoBxfK0/AiKi6pQp7oMCakrYGh9x8mKVzX6EjPHYuzeL9X2+jKn90ckO 3ko/FQb3E2eYjy8Ws8Hd5tujuwh5edqRIzR+voa2CrvI1fUr6dKv/hjIflyYPnw5 O5/0X0SFyjcseRcRYwnEzQlplVwrekFbaEsuA99bLdvATPB947uoTepjFD6MSFWw uLOGvxPaVVf0ZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefuddgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh 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 B2BCF108005C; Sun, 3 Jan 2021 06:25:43 -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 2/5] net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check Date: Sun, 3 Jan 2021 05:25:39 -0600 Message-Id: <20210103112542.35149-3-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210103112542.35149-1-samuel@sholland.org> References: <20210103112542.35149-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sun8i_dwmac_unpower_internal_phy already checks if the PHY is powered, so there is no need to do it again here. 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); -- 2.26.2 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,TVD_SUBJ_WIPE_DEBT, 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 8499DC433E0 for ; Sun, 3 Jan 2021 11:27:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48FF520773 for ; Sun, 3 Jan 2021 11:27:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48FF520773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=anfxVk9YGr9aaxQDrKPwdOY/tJxPKT5nWFEhFs8AQUA=; b=QsUflen1P71qkoJkRsDGdOB+d 09lIWqztZEV7nbo6Ym9IXBHTbLGP6uPnRFVyakDfIKsXAHaODnCKZVsuAFm8OqaSsPgJfX65I+l+A 3SYMAhZ5xJMl4T04QeVBeUkQ12BFJaicq81xE7UAcT7D7LjnJXX+3vYnJrXsewYYvBn1nl7wLBasU 3uKmgjco8j2/6CGCJCG56lpd2u2KAg47tyAAU64u2PTqVzvEf2C57vFVKG8EF5bF1Eft2LUcTKLmV cAknQwphJ/03Irl3alSw7Ouh0n9Cxq3hbTc4KQy6TNqkOOllbglNCplJ2cTSt4+zIdySP4Gs1swmC Ki1LISj+w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw1WL-0006wc-Gi; Sun, 03 Jan 2021 11:26:01 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw1W8-0006sT-NE for linux-arm-kernel@lists.infradead.org; Sun, 03 Jan 2021 11:25:51 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id B76CC52C; Sun, 3 Jan 2021 06:25:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 03 Jan 2021 06:25:46 -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=s0u0iw4NXUklB tchF6xGq/pKW5YBdSZTP5OnSimeOLk=; b=sphcgAim3lcd6mwB/ux61x4dTrkfg riL2UosJfHrVDA3nrTZm/VQByJEdHkHLF2VT0oihehi7ZTN5UBGWL0YqXaTUrdLZ pfbKkX8nJY/NQT24y/P4vOBtSaA8V5l8ab2iV0uERBTJb3QQMM6mAkj9rR2hVa/G RdsMEsPxCl1GANlkQ69/7WEW1x7HonErpGlxI5f7frgt+tI0LVGEWp/COwNYTpu1 qtJBRxxOiyhvZXkH0PXBlNCAo5Ei1JgKJhzByccJa3lic1tiCaxW9V/CYvPLvwAG Wz4naIKj/ZCKhb8zd6A675/ZNux0Epy9asxJTi2mOIgGOovKo11nJRvmg== 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= fm1; bh=s0u0iw4NXUklBtchF6xGq/pKW5YBdSZTP5OnSimeOLk=; b=VgHTlXKh p5zz+qBdWN4xn2ejP40GDXG7zn2WtPFCwSloSalpwhqtkjrVD8SWxjv/WZGPeGrS yq3Hk3o9bCXo3XFINMFswEDFZXPDAR0PEJH1dxtKHmf282nf0gBfzvEVl5VI0dre ojL/mQQDXoBxfK0/AiKi6pQp7oMCakrYGh9x8mKVzX6EjPHYuzeL9X2+jKn90ckO 3ko/FQb3E2eYjy8Ws8Hd5tujuwh5edqRIzR+voa2CrvI1fUr6dKv/hjIflyYPnw5 O5/0X0SFyjcseRcRYwnEzQlplVwrekFbaEsuA99bLdvATPB947uoTepjFD6MSFWw uLOGvxPaVVf0ZA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdefuddgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucfkphepjedtrddufeehrddugeekrdduhedunecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghn ugdrohhrgh 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 B2BCF108005C; Sun, 3 Jan 2021 06:25:43 -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 Subject: [PATCH net-next 2/5] net: stmmac: dwmac-sun8i: Remove unnecessary PHY power check Date: Sun, 3 Jan 2021 05:25:39 -0600 Message-Id: <20210103112542.35149-3-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210103112542.35149-1-samuel@sholland.org> References: <20210103112542.35149-1-samuel@sholland.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210103_062549_127694_AF29D46B X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , Samuel Holland , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org sun8i_dwmac_unpower_internal_phy already checks if the PHY is powered, so there is no need to do it again here. 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); -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel