Re: [PATCH] PCI/pwrctrl: Skip creating platform device unless CONFIG_PCI_PWRCTL enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 24, 2025 at 02:21:04PM +0530, Manivannan Sadhasivam wrote:
> On Sat, May 24, 2025 at 08:29:46AM +0200, Lukas Wunner wrote:
> > On Fri, May 23, 2025 at 09:42:07PM -0500, Bjorn Helgaas wrote:
> > > What I would prefer is something like the first paragraph in that
> > > section: the #ifdef in a header file that declares the function and
> > > defines a no-op stub, with the implementation in some pwrctrl file.
> > 
> > pci_pwrctrl_create_device() is static, but it is possible to #ifdef
> > the whole function in the .c file and provide the stub in an #else
> > branch.  That's easier to follow than #ifdef'ing portions of the
> > function.
> > 
> 
> +1

I dropped the ball here and didn't get any fix for this in v6.15.

Why do we need pci_pwrctrl_create_device() in drivers/pci/probe.c?
The obvious thing would have been to put the implementation in
drivers/pci/pwrctrl with a stub in drivers/pci/pci.h, so I assume
there's some reason we can't do that?




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux