RE: [PATCH 1/1] PCI: fix the build when CONFIG_PCI_QUIRKS=n

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

 



Randy Dunlap wrote:
> On Fri, 18 Dec 2009 16:49:48 +0800 Dexuan Cui wrote:
> 
>> When CONFIG_PCI_QUIRKS=n, the kernel build fails:
>>> drivers/built-in.o: In function `pci_dev_reset':
>>> pci.c:(.text+0xdb0b): undefined reference to `pci_dev_reset_methods'
>>> pci.c:(.text+0xdb2b): undefined reference to `pci_dev_reset_methods'
>>> pci.c:(.text+0xdb85): undefined reference to `pci_dev_reset_methods'
>> 
>> We should add a dummy pci_dev_reset_methods[] in this case.
> 
> OK, that works.  I admit that I would have just made a stub for
> pci_dev_specific_reset() in pci.c instead, or just put the
> data struct and for-loop inside #ifdef CONFIG_PCI_QUIRKS/#endif.

Can CONFIG_PCI_QUIRKS appear in pci.c? I'm not sure. :-)

Or, can we move the  pci_dev_specific_reset() into pci.h and make it "static inline", and if 
"#ifndef CONFIG_PCI_QUIRKS" it just does nothing and "return -ENOTTY"?

Which is the best?  Please comment.

Thanks!

-- Dexuan--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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