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 53412C9830E for ; Sun, 27 Sep 2026 21:48:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id: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-Owner; bh=uRCO1hCvm+HcqUF0cIAAS7cPIp9rv+bSF/z0y9cWaHQ=; b=OQDvGI0nP3PgFOKC4p8uEvCm1C dPgC84zJP0xExoF2fPfRyQFbgrQkFMbQXpzGgo5yDDjdcsrmFzZEYvBC8JH0/P6iDiHUFKNMjDLal ax2TloN//g6Y03WX37NgqEngUjiMPh6eXLDHX0Oz+rd/qR5UjCzqONZ4Xn+AuEe2Z2FQSpAgakEr4 T3fNa0Qg976XMd9gY3qbJMUtVQox6g08Sk0uH6y/smdJGlSiUsarI3GMMqjkvKxgWw9qZMvAv+jMu NEJUdvxJLnOHPE557Nr1DGFzSSXlVDjji7CqVYUJ7RohBrGdY8vSPwIEIPXnc7mFsEf/2ebLwyvXn QJIzFuJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAwjt-0000000GuJS-2f0V; Sun, 27 Sep 2026 21:48:53 +0000 Received: from vps0.lunn.ch ([156.67.10.101]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAwjr-0000000GuIt-0YeD; Sun, 27 Sep 2026 21:48:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=uRCO1hCvm+HcqUF0cIAAS7cPIp9rv+bSF/z0y9cWaHQ=; b=Oef4GSQIwPZhqB72EoCeNbmCAq irFkql9KZPdDbyxsCkLuIvvPTBcEDaProqDUuRc/XEMrrz43SR/x9RNcawsFv2BRBxChM/DczMi4e EmNeU5/fV2D+Jcox6GfO+YtEQV7awuKJOQKbUjo9CPeqGOjyKYGTnwRPtOm6g2+qRdFY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1xAwjU-007ZW8-Q9; Sun, 27 Sep 2026 23:48:28 +0200 Date: Sun, 27 Sep 2026 23:48:28 +0200 From: Andrew Lunn To: Christian Marangi Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Matthias Brugger , AngeloGioacchino Del Regno , "Chester A. Unal" , Daniel Golle , Heiner Kallweit , Russell King , Simon Horman , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org, mfd@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v23 8/9] net: dsa: mt7530: generalize and move common function to lib module Message-ID: References: <20260925182435.21207-1-ansuelsmth@gmail.com> <20260925182435.21207-9-ansuelsmth@gmail.com> <6ab97c6e.f5ac67e6.37e70.11e5@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ab97c6e.f5ac67e6.37e70.11e5@mx.google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260927_144851_177375_D82B68BB X-CRM114-Status: GOOD ( 26.24 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Sun, Sep 27, 2026 at 10:28:25PM +0200, Christian Marangi wrote: > On Sun, Sep 27, 2026 at 09:02:09PM +0200, Andrew Lunn wrote: > > On Fri, Sep 25, 2026 at 08:24:30PM +0200, Christian Marangi wrote: > > > In preparation of support of DSA Switch from Airoha, create a mt7530 > > > library module and move there all the common function. > > > > > > Function are generalized to use the reg_field regmap API but still apply > > > the same exact logic. Every function is renamed to mt7530_lib prefix to > > > better identify it. > > > > > > Minimum modification are needed to the register header and common enum and > > > macro are moved to the mt7530 library header to permit reuse. > > > > > > A library struct is introduced with everything required for the common > > > functions. > > > > > > The generalization and the introduction of reg_field regmap API have the > > > side effect of permitting to clean the mirror functions that required > > > special handling for MT7530 and MT7531 based switch that had different > > > registers. This is done by declaring a common MT7530 reg_field and a > > > specific one in the Switch match table. > > > > > > No behaviour change is expected by this change as it's just a code move and > > > reimplementation. > > > > > > Signed-off-by: Christian Marangi > > > --- > > > drivers/net/dsa/Kconfig | 4 + > > > drivers/net/dsa/Makefile | 1 + > > > drivers/net/dsa/mt7530-lib.c | 1128 +++++++++++++++++++++++++++ > > > drivers/net/dsa/mt7530-lib.h | 391 ++++++++++ > > > drivers/net/dsa/mt7530-mdio.c | 4 + > > > drivers/net/dsa/mt7530-mmio.c | 4 + > > > drivers/net/dsa/mt7530.c | 1368 ++++++++------------------------- > > > drivers/net/dsa/mt7530.h | 256 ++---- > > > > The number of mt* file keep going up. Is it time to move it into a > > subdirectory? > > The problem as always is that mediatek directory will also contain airoha > stuff... That is only a Marketing problem, and Mainline generally ignores marketing. Companies get bought and sold all the time. We don't rename anything because of that. > I would like to fix some trivial things pointed out by sashiko. Can I apply > those and keep the review tag? For this patch for example it's just the > typo for the multicast MIB. > > For the other patch is also very trivial stuff. Yes, not a problem. If you make major changes then drop it, but trivial stuff is fine. Andrew