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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7DBB6C83F10 for ; Sun, 27 Aug 2023 18:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tOIlxKItuRJMuJRyJ+UDQ8kdVWzpAFrhuoF3QVlZNE4=; b=sjOxPYUePRty0x 9+6Bv+fuBWFk3y0wTWZtGkYx8UIVQn3nKHD9YutJVeA+AM/fzrzf16hzXUR/X7qcivVFvRP06EwZs fPlXMbWwoDyeYlylrD5LFZKUVXjZXEzV3ChIMRcvvSxEx1pscpAZeEQEUgg+BniF8Ai/o7Jd5Ju2h jA+oXPBrIZ2ATNr631azpWzeLNNLx1YU/xc9CYnzN3jDg+26PcJe8+JpBCdZQa9ElkJnVoatUcVjP PrwBFmQ1bG/iYt9a9der76HS4pRNZ5scFUZO7wqlUlqWgbqhbM05uBJYrN8M1/uLiUse95KkZIZ1p IsJduuqZFQQnSnslTbjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qaK38-008LBy-1V; Sun, 27 Aug 2023 17:59:46 +0000 Received: from [2001:4d48:ad52:32c8:5054:ff:fe00:142] (helo=pandora.armlinux.org.uk) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qaK32-008Kvv-35 for linux-arm-kernel@lists.infradead.org; Sun, 27 Aug 2023 17:59:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=3bcqGb8c9MJdTQ6tWNLuuoF9D7rQzI8cfAXINlj2RDI=; b=XXdQMLUmFZOx4/OSGyjOKjkXQO 6NMQdjFHsIPxoVX1hyRgrdHuXR63gKElQ/cNdJIl2uZ3gy5+NGINuxF7oWPDqxBA9ThHOW+f3osK7 p+fDlQ90EEK5mC2Z0A9LTYzcEvDFtEWGrAEELsbthQkpWFt5pbHF6I79rRBECnHF5zE6WfQFZxTxe SNGGsfVnpxQ8IzqYH+8qz4BvRZq4a1jv/K2SiW2oxuazQccAMje6MBWTRnsnR2pwmUP9y5sj1s0qT eUwkURqWTczX0h8KVf+nROL0UQy/zYNAMEcVjXJOPYf2Q07tNq47i/ekqDZG8/uE+Ci8IsnFrinC1 vlLHV+KQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:51984) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qaK0f-00076U-35; Sun, 27 Aug 2023 18:57:14 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qaK0c-0002it-AX; Sun, 27 Aug 2023 18:57:10 +0100 Date: Sun, 27 Aug 2023 18:57:10 +0100 From: "Russell King (Oracle)" To: Emil Renner Berthing Cc: Jisheng Zhang , Samin Guo , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-starfive: remove unnecessary clk_get_rate() Message-ID: References: <20230827134150.2918-1-jszhang@kernel.org> <20230827134150.2918-3-jszhang@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230827_105941_362665_D9320100 X-CRM114-Status: GOOD ( 12.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 On Sun, Aug 27, 2023 at 07:33:10PM +0200, Emil Renner Berthing wrote: > On Sun, 27 Aug 2023 at 15:53, Jisheng Zhang wrote: > > > > In starfive_dwmac_fix_mac_speed(), the rate gotten by clk_get_rate() > > is not necessary, remove the clk_get_rate() calling. > > Thanks. I suggested this change during the initial review, but someone > wanted the code as it is. I must admit I don't understand why, so > Reviewed-by: Emil Renner Berthing The code in starfive_dwmac_fix_mac_speed() is a repeated pattern amongst many drivers, and having each platform driver re-implement this is not sane. Those who know me will know that I have a patch that cleans this all up - moving basically the guts of this to a library function which platform drivers can make use of. It's not like the clock rates are somehow special - they're standard for 10M/100M/1G speeds on a GMII-family interface, and the 10M/100M also share the clock rates with MII. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel