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 68419EDEC5B for ; Wed, 13 Sep 2023 14:15:44 +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=+C2+jB4A72QcInSmsh/NJlySSN4dEM9Q0mmv0UI8mQk=; b=TaiLpxZYeiR3t6 goe0Wx3utCaInCcCzu1oBJTOlUOGILgq4cgj//7ESfDGznUl4jJRC87oRxPcoUhKxiAz3g0taDfEn ffuehxX3/TPqsluIbBuKCIrLmDQheFfrJ6ePyzzBGbewrnciWFsaizAEaS2n49ov6dRidtVDnbdxy qXyBldpJDDSBffHzkePOKoahQRJwllgiYt4SBeDNd4Y5rl/F+BJrKQNbj37isK33d1cTo7Shf3jAV bP/Sz9XGx11iXj6+f4D74nTTjsqzZxtob/XCGxSEn/jtl8KShMqjHHDl9GNev9IHRipPEN+bGAHhn 7fi1SXLuaj1rUE4uqBGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qgQeD-0066Xg-1r; Wed, 13 Sep 2023 14:15:17 +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 1qgQeA-0066RZ-0G for linux-arm-kernel@lists.infradead.org; Wed, 13 Sep 2023 14:15:15 +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=Dr9jtRN5Zjwy4bsyHyYLS2GKIOm5Y95VojtQA/GJRqQ=; b=Ug8dQLyb8k9tIKTUBA7KOYOtzA TGYbIdfGyrc0QSwcWLVs7z0m6cEE2Absz4yowNqJ//Uky5sFEWmQ7SsS7ZYD6/wYHA88/giS68u1j tUBuhIlX9Xciy6wy6VzH4a5yCN1kX04/WvCIi/CxrsBk5jqx6YQiEY7bp6umnO8HyGIQWMn7GKVkC fWvEv0Gh/cJmTVbr+Igq/2PfMIi5v8Y/IacwpAQqrRvfYxowsMEPwdeXGsFHbIqwWPB3TVXL2v2UK eDZOQjKVrYlXKOaF4ThO26lcr77uZKbAPXDEW9RGEJPnrGAPzO4baXFLsTY35hMhcMgzPyCIUilhR 4+MejUbQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:54402) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qgQdo-0002Zp-01; Wed, 13 Sep 2023 15:14:52 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qgQdj-0003nb-3X; Wed, 13 Sep 2023 15:14:47 +0100 Date: Wed, 13 Sep 2023 15:14:47 +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_071514_119633_4215A3BB X-CRM114-Status: GOOD ( 30.16 ) 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: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. Thanks. -- 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