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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C367C433F5 for ; Tue, 16 Nov 2021 00:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3898D6325C for ; Tue, 16 Nov 2021 00:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355576AbhKPANa (ORCPT ); Mon, 15 Nov 2021 19:13:30 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:50873 "EHLO mail-wm1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352023AbhKOVxr (ORCPT ); Mon, 15 Nov 2021 16:53:47 -0500 Received: by mail-wm1-f46.google.com with SMTP id 133so15233208wme.0; Mon, 15 Nov 2021 13:50:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Zpo2FcY0JFle+1sWMVU6xVo7WBKafm0rx46PVS7H5Og=; b=p1H5TsPszo6J0RWUpcwlqL2joGIRol38ZJPQ/mGnJLTHAqYX7XWW8+DLff+CAaK8he ap5bQTYPdw5i8DzsY92gMEoPmu0K4sdQOy7zvmiX8lkI97QrKgwb77XtKT0AsVQF+c+c rGgvTU/f5UkPCq4l1ljjJ+jo5WrgRadfytV7iPuKCAUcWXz2GcCwCGDgqGgOMzzQy/D/ I22rszVBHDJS7XrzbaXhtF5xTvrFTT05KvVHA5QHeSO7MktXxGEqw/3QMAUA3zSC9ETV qeT8nkYDKnh5r6Y+KpFBBZtg9YuN0CSNIcJLmgDUz1TFyVnet1Ilwbj5EPgTIFq86kIU IwNA== X-Gm-Message-State: AOAM5300WNFfUZvKA1Ro4q6Hxtgg43KbYVGEV1Djb5B1EvCToKNm8OZg 1yS5oScHw5OPMNhwTVLVHAE= X-Google-Smtp-Source: ABdhPJww7K1XBBi0PWxrQOFVuk8+zAGeety4qxeCcVFbci3CpQiU5u5cW5CXl2Fvmnjj75pJDUzBmA== X-Received: by 2002:a05:600c:299:: with SMTP id 25mr15075288wmk.77.1637013050094; Mon, 15 Nov 2021 13:50:50 -0800 (PST) Received: from rocinante ([95.155.85.46]) by smtp.gmail.com with ESMTPSA id q84sm887283wme.3.2021.11.15.13.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 13:50:49 -0800 (PST) Date: Mon, 15 Nov 2021 22:50:48 +0100 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Arnd Bergmann Cc: Sergio Paracuellos , linux-pci , "open list:BROADCOM NVRAM DRIVER" , Thomas Bogendoerfer , John Crispin , Lorenzo Pieralisi , Bjorn Helgaas , Linux Kernel Mailing List , Yanteng Si Subject: Re: [PATCH 4/5] PCI: mt7621: Add missing 'MODULE_LICENSE()' definition Message-ID: References: <20211115070809.15529-1-sergio.paracuellos@gmail.com> <20211115070809.15529-5-sergio.paracuellos@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, [...] > > > builtin_platform_driver(mt7621_pci_driver); > > > + > > > +MODULE_LICENSE("GPL v2"); > > > > A question here about the builtin_platform_driver() use in this driver, > > especially since it's set as tristate in Kconfig, thus I am not sure if > > using builtin_platform_driver() over module_platform_driver() is correct? > > > > Unless this is more because you need to reply on device_initcall() for the > > driver to properly initialise? > > builtin_platform_driver() does the right thing for loadable modules that > have no module-unload and are not intended to be removable. > > This is often use for PCI drivers, but after Rob reworked this code a while > back, it should actually be possible to reliably remove and reload PCI > host bridge drivers, and it would be good to eventually lift the restriction > here as well. Thank you for letting me know. Much appreciated. I assumed in the past that with tristate in Kconfig the module_platform_driver() would be the preferred route. Krzysztof