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 BA395CA0EF1 for ; Tue, 12 Sep 2023 17:09:28 +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=0ojf7dbuYYxUQVUwJyNekRaeVvdgUjg7VEEi3vAFfB4=; b=ImpLwX7X2HgEDm CfrrKDsxitU4h7h4L9gF16MmHAYdQleMyObufCJjFaoKboS0ZaNP5y1bPhml2Z9HgV7LL+0MbK/CT ZF+/6iKm26bmTqCPGpTDLd83c3rICmrHa0hE6HHwfSMMJzZ+lLv26QKMr3wQhSMfRGSuMz2hxaBXC wgVPxmCpBam3StDojWUUZMK/N4m5RY06DS6FKWV9eokTuWoAqyUVD3QybLGvTugDK6KcqqY3PHSlk u5++anuoeiEiz4ljWt0TklToJ7Ay6XRmxAmlrjhqkBIFVcfCGddnTY0RVUwKnWU7FfWLGwN2zrTdY r4r87dW+i6kPHrnkNAKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qg6sk-003tCM-20; Tue, 12 Sep 2023 17:08:58 +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 1qg6sh-003tB3-1M for linux-arm-kernel@lists.infradead.org; Tue, 12 Sep 2023 17:08:57 +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=okqCnYbVQy91IAARHaNw8z0HLkZIzOCxSpKxVhlRnDE=; b=ikwUZiOidDIBI0VTVnEZezBfPj X2vSR01jJ6MEKD9FSvtk2tVycPlBwXdDNVb8nMyFbVlW+GCQ9cKJqzuXDyQ1SEvStlISB3iY4zFyO nArg86HQoEAOCulQDUCN3Tzn+Nt9su/nwR37Su4OI3k7TlPHeeRkAanZSJyzurAF28GVg+yrgHSsd 5WQcUXmyZDRGF0k6FRVDgJowMJzgah+XOVdj+UjeeEsMcWqT0e8Bn8L2TcefZVHYz5nwhmRxf9Qbw Rcwqp1/FwfrBkyDVBKLW5Gvm1TSGdGiPNm1K/Lcec55E8JPSfbuzOyD2YN+x4ZsYXMhCH1TKrAapn JyeT2wGQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:50484) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qg6sG-0001Ud-27; Tue, 12 Sep 2023 18:08:28 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qg6sB-0002sJ-PK; Tue, 12 Sep 2023 18:08:23 +0100 Date: Tue, 12 Sep 2023 18:08:23 +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-20230912_100855_458934_C3A5CD7F X-CRM114-Status: GOOD ( 20.52 ) 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 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. -- 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