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 8CC46FA3740 for ; Thu, 27 Oct 2022 12:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235799AbiJ0Msq (ORCPT ); Thu, 27 Oct 2022 08:48:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235725AbiJ0Msp (ORCPT ); Thu, 27 Oct 2022 08:48:45 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 065AB16DC0E for ; Thu, 27 Oct 2022 05:48:45 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id e15so1140156qvo.4 for ; Thu, 27 Oct 2022 05:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ivr3WQ9zDX9Y22oat/ojEdcP2jI5Jp64wFrkCI45QPU=; b=X9+Dqqb+6eCq2gOlGFQdxBEM9fMVjIiMtkhbinWXMgvolMLdOEAZ0uhDT8nZLOuSJw y2/iEMvLvOsW7qfalSwQGdCtUXAoXilBM8hGiKGl2ykX/DvUEm7lURDB9/iZKV5RYFgU 09mQ0X0ygNe4d2S9QaKbAoFjOBZDYDCLv8rWGOYzZhigpaJeXc0kYA7ab6CMBo88GYW1 crqToUC6YK3UyhyEmQgvQhc5LLCWWuZXptSUxGtgc+Wij+HVrSvoHghx27RJ0a6owXb1 5kIV6oGOSHeeRpnm74+qO3qMln5n2TpSgXYQFYaAPKQdRgoi4To/Y+dQosDl/L/dsmPf m2BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ivr3WQ9zDX9Y22oat/ojEdcP2jI5Jp64wFrkCI45QPU=; b=tI50BkhBZDmEr7OgupSn4OierUKvqQTwU8fF10Ioe480s7U6Hf0tfy8EM5eCduo6GL 5XsUU9HUTn7f+RcJVNtVYxm+R2KJL2KDNAMuVUMCUSVVXkg5Q9ili0Qe3JV3SUji2XuJ 7TgM4LXTGMM/pOv9HwegZ0eeZWArplKb1bjXI+qK8PU0f8g5byKaZ4FlHIjNsIBodB2x TlU0EPBMhB7sXR21BwaH4FFd/HZ0HkprJ1k9tiw3YHrxD3hv7WtKDJxrwWPp7zUGWdh5 /rRuxi0/T9T4fd4qyrHozHlOUC2DJt4AwXL4TeRkcEGr8ODDa+Z5scq29IQ32UJLduSO CCmg== X-Gm-Message-State: ACrzQf35OF4H1o5hpTXRN9aDsz9ktm6asJnA2ssBIWrEkbKAtjnxgX9s iVr3oNg4bU4yJGrI8rKH14iJBw== X-Google-Smtp-Source: AMsMyM6NYajlewJo1rx9NQm0NgImM/f60WhI72FLmeO1JCXGB5Br56/FA9bm1X0JwH+22uADv73HRw== X-Received: by 2002:a0c:979a:0:b0:4b7:4a8c:a80d with SMTP id l26-20020a0c979a000000b004b74a8ca80dmr34679342qvd.42.1666874924180; Thu, 27 Oct 2022 05:48:44 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id u14-20020a05622a17ce00b0039bde72b14asm777902qtk.92.2022.10.27.05.48.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Oct 2022 05:48:43 -0700 (PDT) Message-ID: Date: Thu, 27 Oct 2022 08:48:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [RFC net-next 2/2] net: dsa: Add driver for Maxlinear GSW1XX switch Content-Language: en-US To: Camel Guo , Camel Guo , Andrew Lunn , "David S. Miller" , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Krzysztof Kozlowski , Paolo Abeni , Rob Herring , Russell King , Vivien Didelot , Vladimir Oltean Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , Rob Herring , kernel References: <20221025135243.4038706-1-camel.guo@axis.com> <20221025135243.4038706-3-camel.guo@axis.com> <55da4718-4422-745a-8880-95adc8e0abd9@axis.com> From: Krzysztof Kozlowski In-Reply-To: <55da4718-4422-745a-8880-95adc8e0abd9@axis.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 27/10/2022 02:35, Camel Guo wrote: utdown(priv->ds); > >> + > >> +     dev_set_drvdata(priv->dev, NULL); > >> +} > >> +EXPORT_SYMBOL(gsw1xx_shutdown); > > > > 1. EXPORT_SYMBOL_GPL > > Will update in v2 > > > 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. > > All stuff in drivers/net/dsa/gsw1xx_core.c is supposed to be generic and > totally independent of the actual management interface (mdio, spi, uart, > maybe memory-mapped IO). This way, I think the gsw1xx_core.ko can be > reused in > gsw1xx_spi.ko, gsw1xx_uart.ko and so on. > > I don't how similar the chips that lantiq_gswip.c supports are due to > no datasheet. If not too much, maybe someone the gsw1xx_core.ko can also > be reused in lantiq_gswip as well. Keep the files separate but there is no need to make two modules and exprt this. Your patch should stand on its own, not prepare for some imaginary future work which might or might not bring more modules. Once these future modules appear, it will be easy to change existing file to a module. Best regards, Krzysztof