Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8029467rwb; Wed, 23 Nov 2022 14:26:44 -0800 (PST) X-Google-Smtp-Source: AA0mqf7oYDd4jt3W+iggWSlw7p5BX+OovXSzkeYBuvz8VY07ZsZhh9vxC0G7psb1EZbJlCCa+XEY X-Received: by 2002:a17:902:f391:b0:177:ed70:70ff with SMTP id f17-20020a170902f39100b00177ed7070ffmr12074241ple.28.1669242404048; Wed, 23 Nov 2022 14:26:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669242404; cv=none; d=google.com; s=arc-20160816; b=lAzeERtkAlHwZ/Z/s1Z8/SWws7rSG9msM4bRp4VeTgZY+OHQi3KUQKCX8zE8f4ePez PFIB4ceC23hZmyIO6jf+f1is/GejvPnvfT+uGq3OxCwv4VN5JRM37Vxhy+N0BrN4gc0o g/EMTjXFHpbLovfUjBY5Fbtz0j1lEo3mfLI6aIz6RFz2PxX0eLidIt8jxuBT6qsaG/vz R5gYrpQkLP05IFspSxu1lnMwRQx9i8M1C4C7q04EqR11H8MD8XjkQMxjzGjdt5fQ8jab YvG1XmztZ5qRTwvxNAq83Sdpa6LCFwqga8o8wmEAlkJiBlxObRJ5niIcD08WL6/F4PtN 5ySg== 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=aw2BXawO+gI2px4foXQHN/iThcaB+rQzuEfnc8I5o8w=; b=myk7/k9zje9M8ioDbttmo4OI9NEn1SNqqsQYVG2Y3KNYErAOn74tG66ylzgqYOk8iB VT5y6DtNnZswzFdYk0is0nLD/0265rY3T3PierVN6MEv8RhnhXR020e5GH+4eex6IRrE GYyDFI9J6lDPsIUzK4NJsZhD3Kx9zaKD4wszkQN9u/jCc0x1NgsjiuWQt7cJhzkSQmiW tztdzGQt7Hq/QbAsB+gTEEHL4+L1HEVEsFF8RTYWChHWihLZ/WZ+BCv6506xN6zA6Rhw yBjiVQ1dFSg7TG0knXcCAzgPuFxPewKljK0FWTzu3I/Gzqq6c6vaHXqNC838FMw+IACo vHeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=sQhIOTCI; 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 d19-20020a170903209300b001865f8637a8si15721917plc.334.2022.11.23.14.26.32; Wed, 23 Nov 2022 14:26:44 -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=sQhIOTCI; 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 S237899AbiKWVsY (ORCPT + 88 others); Wed, 23 Nov 2022 16:48:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237704AbiKWVsW (ORCPT ); Wed, 23 Nov 2022 16:48:22 -0500 Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8252A32B96; Wed, 23 Nov 2022 13:48:20 -0800 (PST) Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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-201.mailbox.org (Postfix) with ESMTPS id 4NHZW46rH1z9sTm; Wed, 23 Nov 2022 22:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1669240096; 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=aw2BXawO+gI2px4foXQHN/iThcaB+rQzuEfnc8I5o8w=; b=sQhIOTCIFKcEXfmQZbziXRWCTJY78/QNsQfkuZNqg1w3IDW7RRjTlhGdZWNixdCGjvmg64 MWvv100IFEWs+0bPLqESrYPLLNFDzDyC8dFxCrj0ukGJh+Yc3+RLLvhdnuno9QGaBxxH4i v2vAG5TrRE7jVQVIKy9nwCUOa42FNNeKsQZ+pUWhJCpIsTWfayEIV14r8QEugQB3LvjB7n we/bqtf2eEVBHp+icbnoxaeqIz7sxM2kaxXzm7dz72dygXMxolLzFvMzThE9C5J3Uk4AST iGfwYOIxVdIE7JBM141HsB2uNJ+AaTlcS1U6gtnmCPeVWm8vWlDPnJPL9u07DA== From: Alexander Lobakin To: Colin Foster , Vladimir Oltean Cc: 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 , 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:47:46 +0100 Message-Id: <20221123214746.62207-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: b7otjaeni3xsdy1qrdy9oxk4oj7b6453 X-MBO-RS-ID: d4f309bc62ba0ccc568 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: 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. Sure. I usually barely work with the code touched by the series, so often the names can make no sense -- I'm open for better namings from the real developers. _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 chip is named Felix and the other one is Seville, but the shared code is named felix as well. So at first I thought maybe Felix is a family of chips and Seville is a chip from that family, dunno :D > > 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. Something interesting is coming, nice <.< (re "pls prefix with "net: dsa: ..."" -- roger that) Thanks, Olek