Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp650466rwi; Thu, 27 Oct 2022 06:08:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7hTwdoVUHRSthmAH9yYPRb7yajvUSf05SW/nf7XYQT6MrWB5qLdgnerWSkyUkXmcUQXIPG X-Received: by 2002:a63:d145:0:b0:443:c25f:5dd5 with SMTP id c5-20020a63d145000000b00443c25f5dd5mr41912109pgj.554.1666876109383; Thu, 27 Oct 2022 06:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666876109; cv=none; d=google.com; s=arc-20160816; b=AindZ6TYavPLsENojcDuUd/fF1pEZOe6ZCBTu2fXCzGPF5PmXaM6Qt7rd8hz9gxayj 8mPLVHacqzYLeBoZ7ty9+jonQu7zhgaS/g/dzXu2Zsx2hEo0EWShOJW6VeS8nVJRVrjT yJTL1dOU8Fz1ZRKe52JIGZtxzVrwgrritylKVKdgX/KGwx2uOuv3Zjmi7M+mspgVe44L tqb2eaKzLvXEQ6C8UroiiZApSuufi9b4p6MCsJhAIcasX/t7m8oa3OFDKUKv5cjNxXSj 3xyTXpeReYDIKhlKMYz1WIltvjHcJbUDUMDLWiz9ilqFxpnEJANzHExVI2m55fL6CWbo qx0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UbrorHxjgzyWbWmyo9e7FtpsOHgSgay7NTrAxgHSw9I=; b=xQxVm1WAu6ixV/waYKPpjZNwj3b9LgXVUSOud0Af6t2CYCHD11X2Rx4rD5grfZVc05 QoWcFHUWV3obwtoMQDv1D8Olna8bzOJXGt0XfxjjUq6pfG3PmfM7TyacxXuxRU+t8b7H blUBJ4/LtF0bCyitbcT/yWO/Ac1PV7MjximcEzy3jimngZek95kIorL3zm7XbbJCupKL x/GBZ+TJg0IPjF15YbP34cn7s4V/xeH7jr402E+MEewddA5cq76qbcSLkf07PjZQz10S DYzXpFbBK7mbiPEg8rvyKHfBU/SepaTzB7hEZ76KL7ppmDifn8t1OwAGXN4cclmPAzQA cjOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=e935+Jrx; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a170903234b00b00186a16c000dsi1854451plh.313.2022.10.27.06.08.17; Thu, 27 Oct 2022 06:08:29 -0700 (PDT) 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=@lunn.ch header.s=20171124 header.b=e935+Jrx; 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=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235160AbiJ0MKu (ORCPT + 99 others); Thu, 27 Oct 2022 08:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbiJ0MKs (ORCPT ); Thu, 27 Oct 2022 08:10:48 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EBE9C770; Thu, 27 Oct 2022 05:10:42 -0700 (PDT) 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=UbrorHxjgzyWbWmyo9e7FtpsOHgSgay7NTrAxgHSw9I=; b=e935+JrxMWPMNbRRtFmmNCi7Gk xrtVCipZvb0R4GUc7qh7uNUErCgajtfzoqYfbO0acfEa1bzhzLGAavJPare0BENmY4sIkqmVwar29 GXhTx7QCQfeFhyS+EyaYMhlTwyEWx9xd1xqV7ElOXz8ZVRac868a1KgYqhJ+Ol8bLGSg=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oo1hA-000hfO-Kf; Thu, 27 Oct 2022 14:09:12 +0200 Date: Thu, 27 Oct 2022 14:09:12 +0200 From: Andrew Lunn To: Camel Guo Cc: Krzysztof Kozlowski , Camel Guo , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Krzysztof Kozlowski , Paolo Abeni , Rob Herring , Russell King , Vivien Didelot , Vladimir Oltean , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Rob Herring , kernel Subject: Re: [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch Message-ID: References: <20221025135243.4038706-1-camel.guo@axis.com> <20221025135243.4038706-3-camel.guo@axis.com> <128467d6-8249-9f25-21a7-777fff9854d9@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <128467d6-8249-9f25-21a7-777fff9854d9@axis.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 On Thu, Oct 27, 2022 at 08:35:17AM +0200, Camel Guo wrote: > On 10/25/22 16:56, Andrew Lunn wrote: > > > > +EXPORT_SYMBOL(gsw1xx_shutdown); > > > > > > 1. EXPORT_SYMBOL_GPL > > > 2. Why do you do it in the first place? It's one driver, no need for > > > building two modules. Same applies to other places. > > > > At some point, there is likely to be SPI and UART support. The > > communication with the chip and the core driver will then be in > > separate modules. But i agree this is not needed at the moment when it > > is all linked into one. > > Do you suggest that currently we put the content of gsw1xx_core.c and > gsw1xx_mdio.c into one file and split them later at the time when another > management mode (e,g: spi) is added? No, keep them separate. But you can remove the module exports, and just link them together at compile time into one module. For forward compatibility, call that module gsw1xx_mdio.ko. In the future, somebody can then split it apart again, add gsw1xx_spi.ko, and module dependencies should cause the gsw1xx_core.ko to be loaded first. Andrew