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 09A28EDEC5A for ; Wed, 13 Sep 2023 14:21:51 +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=x7cmWZjHGQHoWacHVakj79dSmtSqCSa5ohA4y99ZGv0=; b=2kNBqz2uv8K0bT FXSDTuzzoxxxVszAVJ6MJjIa5DDUFk9Q9jX8cukuF5mm2w2ewhcLLk6AgFFRsKeEm2WaUMgRRMa/S cpLsL9Voamzjpy5/iH8vAN8hjVy2WscexyCp67n2R9wPU9gfBbs3YW3dJ24k6iedk7f7+JRxweVeH BgmYVyaLnNtD6In8PXhVpaCyLQNkVTyFcfIggtK1t8MXaRHCio7xGvf319a5tOPr+1GmxxjnqA+qK kkFfPYC0/S59Ltg96xaps33zSwYIFszAe5nS2a/XI86wTZwXLOggeYpHezgmJYGYwC93Z4axlIlq6 FcEFLcqmbeVz0DcgZ/qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qgQkC-0066rS-29; Wed, 13 Sep 2023 14:21:28 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qgQk9-0066r5-23 for linux-arm-kernel@lists.infradead.org; Wed, 13 Sep 2023 14:21:27 +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=KCohIAGtLewQbO/Nc+8K1hlWnKuwUOQS3ZuzHeKjiOQ=; b=y9bDquHTmq6CirxuODf/HEvQKY c1yCkZ57l8yO3N01TetIkz1BUKdBFjXsUQ7I6Pu6EbQVCBLFGC+o05XirB31ZFTmm8FcFJ6xEUkAb nA4b1BPWysySvUEC3xZD0gXMQGqA+SFITUkb7bxeL6noyKgtnERhNigrEUUCnT5I0L2aT+Xd6WG3S iLar6a/MZ/BCR6sR45CLfnfPlllZDdQDzx7Leo3YYcE4vBLcTXpNAwTaDM/aBDUP1UwyWH+tfDyzh 4B66t9BNIa8ffo3xsVWiXuPwzq23xr+eQyVoj0g/SgoTbf90DnSNbhvSA+iIvArI4pn9U7wuvIpBL PsAy+reA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:41340) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qgQjv-0002ad-2A; Wed, 13 Sep 2023 15:21:11 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qgQju-0003nm-GP; Wed, 13 Sep 2023 15:21:10 +0100 Date: Wed, 13 Sep 2023 15:21:10 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Jose Abreu , Alexandre Torgue , Alexei Starovoitov , "bpf@vger.kernel.org" , Daniel Borkmann , "David S. Miller" , Emil Renner Berthing , Eric Dumazet , Fabio Estevam , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , "linux-arm-kernel@lists.infradead.org" , "linux-stm32@st-md-mailman.stormreply.com" , Maxime Coquelin , "netdev@vger.kernel.org" , NXP Linux Team , Paolo Abeni , Pengutronix Kernel Team , Samin Guo , Sascha Hauer , Shawn Guo Subject: Re: [PATCH net-next 1/6] net: stmmac: add platform library Message-ID: References: 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-20230913_072125_675873_134DCCCB X-CRM114-Status: GOOD ( 33.47 ) 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 Wed, Sep 13, 2023 at 03:14:47PM +0100, Russell King (Oracle) wrote: > On Wed, Sep 13, 2023 at 03:56:07AM +0300, Serge Semin wrote: > > On Tue, Sep 12, 2023 at 06:08:23PM +0100, Russell King (Oracle) wrote: > > > On Tue, Sep 12, 2023 at 12:32:40PM +0300, Serge Semin wrote: > > > > On Tue, Sep 12, 2023 at 07:59:49AM +0000, Jose Abreu wrote: > > > > > From: Russell King (Oracle) > > > > > Date: Mon, Sep 11, 2023 at 16:28:40 > > > > > > > > > > > Add a platform library of helper functions for common traits in the > > > > > > platform drivers. Currently, this is setting the tx clock. > > > > > > > > > > > > Signed-off-by: Russell King (Oracle) > > > > > > --- > > > > > > > > > > drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- > > > > > > .../ethernet/stmicro/stmmac/stmmac_plat_lib.c | 29 +++++++++++++++++++ > > > > > > .../ethernet/stmicro/stmmac/stmmac_plat_lib.h | 8 +++++ > > > > > > > > > > Wouldn't it be better to just call it "stmmac_lib{.c,.h}" in case we need to add > > > > > more helpers on the future that are not only for platform-based drivers? > > > > > > > > What is the difference between stmmac_platform.{c,h} and > > > > stmmac_plat_lib.{c,h} files? It isn't clear really. In perspective it > > > > may cause confusions like mixed definitions in both of these files. > > > > > > > > Why not to use the stmmac_platform.{c,h} instead of adding one more > > > > file? > > > > > > > > Is stmmac_platform.{c,h} used by all the drivers that are making use of > > > this? I'm not entirely sure. > > > > > > If it is, then yes, it can go in stmmac_platform.[ch]. If not, then I > > > don't think we'd want the bloat of forcing all of stmmac_platform.[ch] > > > onto drivers that only want to use this one function. > > > > With a few exceptions almost all the STMMAC/DW*MAC glue drivers use > > the methods from the stmmac_platform.c module including the bits > > touched by your patchset. AFAICS semantically both stmmac_platform.c > > and stmmac_plat_lib.c look the same. They don't do anything on its own > > but provide some common methods utilized by the glue drivers for some > > platform-specific setups. So basically stmmac_platform.[ch] is already > > a library of the common platform methods. There is no need in creating > > another one. > > I'm not questioning whether it should be merged, I'm questioning whether > all drivers that I'm touching make use of stmmac_platform.c, so your > long winded answer was entirely unnecessary. All you needed to do was > answer the question I asked, rather than teach me how to suck eggs. So what about the name of the function? Are you happy that it's called "dwmac_set_tx_clk_gmii" rather than "stmmac_set_tx_clk_gmii" ? -- 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