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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8C8DECAAA1 for ; Thu, 27 Oct 2022 12:10:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234802AbiJ0MKt (ORCPT ); Thu, 27 Oct 2022 08:10:49 -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> Precedence: bulk List-ID: X-Mailing-List: devicetree@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