[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1a895f7c-bbfc-483d-b36b-921788b07b36@app.fastmail.com>
Date: Fri, 29 Nov 2024 09:25:15 +0100
From: "Arnd Bergmann" <arnd@...db.de>
To: "Herve Codina" <herve.codina@...tlin.com>,
"Michal Kubecek" <mkubecek@...e.cz>
Cc: "Geert Uytterhoeven" <geert@...ux-m68k.org>,
"Andy Shevchenko" <andy.shevchenko@...il.com>,
"Simon Horman" <horms@...nel.org>, "Lee Jones" <lee@...nel.org>,
"derek.kiernan@....com" <derek.kiernan@....com>,
"dragan.cvetic@....com" <dragan.cvetic@....com>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>,
"Philipp Zabel" <p.zabel@...gutronix.de>,
"Lars Povlsen" <lars.povlsen@...rochip.com>,
"Steen Hegelund" <Steen.Hegelund@...rochip.com>,
"Daniel Machon" <daniel.machon@...rochip.com>,
UNGLinuxDriver@...rochip.com, "Rob Herring" <robh@...nel.org>,
"Krzysztof Kozlowski" <krzk+dt@...nel.org>,
"Conor Dooley" <conor+dt@...nel.org>,
"Saravana Kannan" <saravanak@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
"Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>,
"Horatiu Vultur" <horatiu.vultur@...rochip.com>,
"Andrew Lunn" <andrew@...n.ch>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Netdev <netdev@...r.kernel.org>,
linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
"Allan Nielsen" <allan.nielsen@...rochip.com>,
"Luca Ceresoli" <luca.ceresoli@...tlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v9 1/6] misc: Add support for LAN966x PCI device
On Fri, Nov 29, 2024, at 09:10, Herve Codina wrote:
> Hi Michal,
> On Thu, 28 Nov 2024 20:42:53 +0100
> Michal Kubecek <mkubecek@...e.cz> wrote:
>> > --- a/drivers/misc/Kconfig
>> > +++ b/drivers/misc/Kconfig
>> > @@ -610,6 +610,30 @@ config MARVELL_CN10K_DPI
>> > To compile this driver as a module, choose M here: the module
>> > will be called mrvl_cn10k_dpi.
>> >
>> > +config MCHP_LAN966X_PCI
>> > + tristate "Microchip LAN966x PCIe Support"
>> > + depends on PCI
>> > + select OF
>> > + select OF_OVERLAY
>>
>> Are these "select" statements what we want? When configuring current
>> mainline snapshot, I accidentally enabled this driver and ended up
>> flooded with an enormous amount of new config options, most of which
>> didn't make much sense on x86_64. It took quite long to investigate why.
>>
>> Couldn't we rather use
>>
>> depends on PCI && OF && OF_OVERLAY
>>
>> like other drivers?
Agreed.
I would write in two lines as
depends on PCI
depends on OF_OVERLAY
since OF_OVERLAY already depends on OF, that can be left out.
The effect is the same as your variant though.
>
> I don't have a strong opinion on this 'select' vs 'depends on' for those
> symbols.
>
> I used select because the dependency is not obvious for a user that just
> want the driver for the LAN966x PCI device.
The general rules for picking one over the other are:
- use 'select' for symbols that can not be enabled manually
- prefer 'depends on' for user-visible options
- do whatever other driver do for the same symbol, to avoid
dependency loops.
Arnd
Powered by blists - more mailing lists