[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXUXMyiMMOF79Wbe+xcL2yAXM8+9j_qJhCM0tn-o-hYeY=-ZQ@mail.gmail.com>
Date: Mon, 18 Dec 2023 15:59:49 +0100
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: Rafał Miłecki <zajec5@...il.com>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Kalle Valo <kvalo@...nel.org>,
Larry Finger <Larry.Finger@...inger.net>, Arend van Spriel <aspriel@...il.com>,
Franky Lin <franky.lin@...adcom.com>, Hante Meuleman <hante.meuleman@...adcom.com>,
Michael Buesch <m@...s.ch>, linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
b43-dev@...ts.infradead.org, brcm80211-dev-list.pdl@...adcom.com,
SHA-cyfmac-dev-list@...ineon.com, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bcma,ssb: simplify dependency handling for bcma and ssb drivers
On Mon, Dec 18, 2023 at 2:18 PM Johannes Berg <johannes@...solutions.net> wrote:
>
> On Mon, 2023-12-18 at 12:58 +0100, Lukas Bulwahn wrote:
>
> Dunno, I'm not super involved with this but ...
>
> > +++ b/drivers/bcma/Kconfig
> > @@ -1,12 +1,7 @@
> > # SPDX-License-Identifier: GPL-2.0
> > -config BCMA_POSSIBLE
> > - bool
> > - depends on HAS_IOMEM && HAS_DMA
> > - default y
> > -
> > menuconfig BCMA
> > tristate "Broadcom specific AMBA"
> > - depends on BCMA_POSSIBLE
> > + depends on HAS_IOMEM && HAS_DMA
>
> [...]
> > config BRCMSMAC
> > tristate "Broadcom IEEE802.11n PCIe SoftMAC WLAN driver"
> > - depends on MAC80211
> > - depends on BCMA_POSSIBLE
> > + depends on HAS_IOMEM && HAS_DMA && MAC80211
> > select BCMA
>
> to me it kind of seems more obvious for example in this case to say
> "depend on BCMA_POSSIBLE and select BCMA" rather than open-coding the
> BCMA dependencies both here and in BCMA? Now granted, they're rather
> unlikely to _change_, but it still seems more obvious?
>
Okay, I see. Well, if that kind of pattern is the preference, then the
code as-is makes sense. The pattern just starts to become obscure when
the dependencies of multiple drivers are the same and we start writing
"BCMA_POSSIBLE || SSB_POSSIBLE", but the dependencies are the same
anyway.
Let us see what others think.
Lukas
Powered by blists - more mailing lists