diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-01-17 11:40:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-01-17 11:40:52 -0800 |
commit | 47ce834fbb6ce6cb9e802f651b647b8030c5fc7f (patch) | |
tree | 1fe68bde208bd5697c323734453a001953d41a47 /arch/xtensa/lib/pci-auto.c | |
parent | c4c6044d35f06a93115e691e79436839962c203e (diff) | |
parent | a03cd7602a090eae277d2b79d43925661e7fbe9a (diff) |
Merge tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa
Pull Xtensa updates from Max Filippov:
- small cleanups in the xtensa PCI and asmmacro code
- fix kernel build with FDPIC toolchain
* tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa:
xtensa: don't produce FDPIC output with fdpic toolchain
xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
xtensa: replace <asm-generic/export.h> with <linux/export.h>
xtensa: fix variants path in the Kconfig help
Diffstat (limited to 'arch/xtensa/lib/pci-auto.c')
-rw-r--r-- | arch/xtensa/lib/pci-auto.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c index aa6752237985..05fc02f9e1c7 100644 --- a/arch/xtensa/lib/pci-auto.c +++ b/arch/xtensa/lib/pci-auto.c @@ -11,6 +11,7 @@ * Based on work from Matt Porter <mporter@mvista.com> */ +#include <linux/bitfield.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/pci.h> @@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus, int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) { - int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0; + int sub_bus, pci_devfn, pci_class, cmdstat; unsigned short vid; unsigned char header_type; struct pci_dev *dev = &pciauto_dev; + bool found_multi = false; pciauto_dev.bus = &pciauto_bus; pciauto_dev.sysdata = pci_ctrl; @@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) continue; if (!PCI_FUNC(pci_devfn)) - found_multi = header_type & 0x80; + found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type); pci_read_config_word(dev, PCI_VENDOR_ID, &vid); if (vid == 0xffff || vid == 0x0000) { - found_multi = 0; + found_multi = false; continue; } |