Skip to content

Conversation

@lrh2000
Copy link

@lrh2000 lrh2000 commented Apr 25, 2025

Currently, LKL cannot be built without selecting CONFIG_PCI. This is because pci.c is compiled unconditionally even if CONFIG_PCI is not specified.

arch/lkl/drivers/pci.c: In function ‘lkl_pci_probe’:
arch/lkl/drivers/pci.c:219:15: error: implicit declaration of function ‘pci_scan_bus’ [-Wimplicit-function-declaration]
  219 |         bus = pci_scan_bus(0, &lkl_pci_root_ops, (void *)dev);
      |               ^~~~~~~~~~~~

This commit fixes the problem by compiling pci.c conditionally. After this commit, pci.c will only be compiled if CONFIG_PCI is on.

Currently, LKL cannot be built without selecting CONFIG_PCI. This is
because pci.c is compiled unconditionally even if CONFIG_PCI is not
specified.

	arch/lkl/drivers/pci.c: In function ‘lkl_pci_probe’:
	arch/lkl/drivers/pci.c:219:15: error: implicit declaration of function ‘pci_scan_bus’ [-Wimplicit-function-declaration]
	  219 |         bus = pci_scan_bus(0, &lkl_pci_root_ops, (void *)dev);
	      |               ^~~~~~~~~~~~

This commit fixes the problem by compiling pci.c conditionally. After
this commit, pci.c will only be compiled if CONFIG_PCI is on.

Signed-off-by: Ruihan Li <[email protected]>
Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @lrh2000 !

@thehajime thehajime merged commit 7a3e989 into lkl:master Apr 26, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants