Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7986889rwb; Wed, 23 Nov 2022 13:43:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4afHy3wQSXpYgmL7ETML789G2mmdXG4g2gEaeCZHIU/Oqa8mFS3tIYSqf8rHHQiUDCHU5q X-Received: by 2002:a05:6402:28cb:b0:463:b0de:c210 with SMTP id ef11-20020a05640228cb00b00463b0dec210mr27707706edb.10.1669239794164; Wed, 23 Nov 2022 13:43:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669239794; cv=none; d=google.com; s=arc-20160816; b=dpn7gFU9qEw0AQQKFyT+fTh8JjhZ40asecsNVH1vP+8BNVJ77k472KdQxYXjT4H2Q/ m+ESVsNaQg45cuHvYj/19QYyJZGl00t1cl0tHALkjCgKhiP0yji1Poz7HoETsPMAHngf krWN4Iujxmu/HXx3tg1S827s5XjQET/rLMpxfQ2v4acT6mFl123yAcMtYKOhgAqUMkVJ t5/QiJsgRD/OyHjTPJOePlYqyQHpL/I50wmNG3dx83c9QgaTEGC/7FuprvyQm33GcbGK BMPFX25/oFkEN0DZ5rOnbiM+RPr8aIm4t9ytC/XhrBYoL/rICXrLS6y/P2WFRHNgR29U w6cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bdMp3iNsz89eWNqp8pGWZH/hHxCMtNpKUEDiIKQqEFc=; b=UqakGX7DWqrihQS3fw+BDFGQDYtRPl0k/MiP4A1aYreKNWtbfuDHun+xjIaDJLABDf pGlGEB33GUdNx/V9g8nqHJJ8DJ2oJZPM6uY7kLr5DkYDQwDnKz3mceIkjH8rplSLeYqI xV7fTziJbq+dTpeVJK1d2KbwBhZovQiu1wcoL8YYYYm/8WxVUMdwHQNSMZM90havM023 3X7tScSKS2ek3dOYRLI9Cjt8L9KRpsLOVHaiKdwh7jQhus7S2MtrH+OPG0hLnbEX1ZVN UfF9c3cpI72DpynSyYiqPlIKcO/SphmLcKOc1fwPCK9eT+Ru4VU7pXN5X38TXUESSRqc BNFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=cqy8UGBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs37-20020a1709072d2500b007881b45441asi16230974ejc.721.2022.11.23.13.42.52; Wed, 23 Nov 2022 13:43:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=cqy8UGBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237540AbiKWVcZ (ORCPT + 88 others); Wed, 23 Nov 2022 16:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbiKWVcX (ORCPT ); Wed, 23 Nov 2022 16:32:23 -0500 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555C68FE73; Wed, 23 Nov 2022 13:32:22 -0800 (PST) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4NHZ8d6r0zz9sQc; Wed, 23 Nov 2022 22:32:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1669239138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bdMp3iNsz89eWNqp8pGWZH/hHxCMtNpKUEDiIKQqEFc=; b=cqy8UGBk3DYqtYjfvKqhJ4BNRCbidS6pSM34wLdHKu/xoN+pJ9Yywm9SiIsg0n59N2SWU3 apCZKU6EmFiCai9GWGT8u2CBcfJD4djI4yei5DszSMsPdKBpzwL5zL1NY6kroiLE2mUEvs 1pbWxeDTt75GcoasBgvaakDPOe30Mgdv1q/f2cUVv4J+lkJexP2FNVVLFMnB0hRCMul7ev d1/gy/9xiV88YG3mYH/LIMbGTU2MFF6qg2eMuq354WFdNBma2xzVNGrb0mj+EboWfeVxTB MNv2vWfaHy++zSxl7c5YKpgTAa0XAUwuftxFvBCSCrsyKqEebaU6ZQo8A+fCWQ== From: Alexander Lobakin To: Colin Foster , Vladimir Oltean Cc: Alexander Lobakin , Alexander Lobakin , linux-kbuild@vger.kernel.org, Masahiro Yamada , Nicolas Schier , Jens Axboe , Boris Brezillon , Borislav Petkov , Tony Luck , Miquel Raynal , Alexandre Belloni , Derek Chickles , Ioana Ciornei , Salil Mehta , Sunil Goutham , Grygorii Strashko , Daniel Scally , Hans de Goede , Mark Brown , Andy Shevchenko , NXP Linux Team , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/18] dsa: ocelot: fix mixed module-builtin object Date: Wed, 23 Nov 2022 22:31:44 +0100 Message-Id: <20221123213144.58738-1-alobakin@mailbox.org> In-Reply-To: References: <20221119225650.1044591-1-alobakin@pm.me> <20221119225650.1044591-15-alobakin@pm.me> <20221121175504.qwuoyditr4xl6oew@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MBO-RS-META: 6oaxuytjxjineax3hrw37r1bqtxy93ex X-MBO-RS-ID: 87f354797b3c031bd83 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Lobakin From: Colin Foster Date: Mon, 21 Nov 2022 10:12:59 -0800 > On Mon, Nov 21, 2022 at 07:55:04PM +0200, Vladimir Oltean wrote: > > On Sat, Nov 19, 2022 at 11:09:28PM +0000, Alexander Lobakin wrote: > > > With CONFIG_NET_DSA_MSCC_FELIX=m and CONFIG_NET_DSA_MSCC_SEVILLE=y > > > (or vice versa), felix.o are linked to a module and also to vmlinux > > > even though the expected CFLAGS are different between builtins and > > > modules. > > > This is the same situation as fixed by > > > commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects"). > > > There's also no need to duplicate relatively big piece of object > > > code into two modules. > > > > > > Introduce the new module, mscc_core, to provide the common functions > > > to both mscc_felix and mscc_seville. > > > > > > Fixes: d60bc62de4ae ("net: dsa: seville: build as separate module") > > > Suggested-by: Masahiro Yamada > > > Signed-off-by: Alexander Lobakin > > > --- > > > > I don't disagree with the patch, but I dislike the name chosen. > > How about NET_DSA_OCELOT_LIB and mscc_ocelot_dsa_lib.o? The "core" of > > the hardware support is arguably mscc_ocelot_switch_lib.o, I don't think > > it would be good to use that word here, since the code you're moving is > > no more than a thin glue layer with some DSA specific code. Yes, sure. I'm totally open for renaming stuff -- usually I barely touch most of the code from the series, so the names can make no sense at all. _dsa_lib sounds good, I like it. > > > > Adding Colin for a second opinion on the naming. I'm sure things could > > have been done better in the first place, just not sure how. > > Good catch on this patch. "mscc_ocelot_dsa_lib" makes sense. The only > other option that might be considered would be along the lines of > "felix_lib". While I know "Felix" is the chip, in the dsa directory it > seems to represent the DSA lib in general. The thing confused me is that one of the platforms is named Felix and the other is Seville, but the file they share is also felix, although Seville has no references to the name "felix" AFAICS :D I thought maybe Felix is a family and Seville is a chip from this family, dunno. > > Either one seems fine for me. And thanks for the heads up, as I'll need > to make the same changes for ocelot_ext when it is ready. > Ooh, something interesting is coming, nice <.< Thanks, Olek