linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org,  linux-kernel@vger.kernel.org,
	 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH] PCI/pwrctl: reduce the amount of Kconfig noise
Date: Tue, 16 Jul 2024 12:02:03 -0700	[thread overview]
Message-ID: <CAHk-=wg-L1K6N+0zZ-bcU7kGZMMDbXj4Z8smrsi1gvbi5U-GiQ@mail.gmail.com> (raw)
In-Reply-To: <CAMRc=MemuOOrEwN6U3usY+d0y2=Pof1dC=xE2P=23d2n5xZHLw@mail.gmail.com>

On Tue, 16 Jul 2024 at 11:48, Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> But this patch does it. PCI_PWRCTL_PWRSEQ becomes a hidden symbol and
> the entire submenu for PCI_PWRCTL disappears. There's no question in
> Kconfig anymore.

Yes, but look here:

        default m if ((ATH11K_PCI || ATH12K) && ARCH_QCOM)

That has at least two issues:

 - what if ATH11K_PCI or ATH12K is built-in and needs this driver?
"default m" is *NOT* valid.

 - what happens when you add new drivers? You keep making this line
longer and more complicated?

See why I say "use select" instead? It means that the drivers that
need it can select it, and you avoid complicated "list X drivers"
things, but you can also get the *right* selection criteria, so that a
built-in driver will select a built-in PCI_PWRCTL_PWRSEQ option.

           Linus

  reply	other threads:[~2024-07-16 19:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 15:23 [PATCH] PCI/pwrctl: reduce the amount of Kconfig noise Bartosz Golaszewski
2024-07-16 15:59 ` Manivannan Sadhasivam
2024-07-16 16:29   ` Bartosz Golaszewski
2024-07-16 16:33     ` Manivannan Sadhasivam
2024-07-16 17:38       ` Bartosz Golaszewski
2024-07-16 18:08 ` Linus Torvalds
2024-07-16 18:48   ` Bartosz Golaszewski
2024-07-16 19:02     ` Linus Torvalds [this message]
2024-07-16 20:10       ` Bartosz Golaszewski
2024-07-16 20:29         ` Linus Torvalds
2024-07-17 12:31           ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wg-L1K6N+0zZ-bcU7kGZMMDbXj4Z8smrsi1gvbi5U-GiQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bhelgaas@google.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).