Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: Use PCI_HEADER_TYPE_MFD instead of literal

Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert
found_multi into boolean.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Message-Id: <20231124090919.23687-3-ilpo.jarvinen@linux.intel.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

authored by

Ilpo Järvinen and committed by
Max Filippov
791beae7 6d638ab8

+5 -3
+5 -3
arch/xtensa/lib/pci-auto.c
··· 11 11 * Based on work from Matt Porter <mporter@mvista.com> 12 12 */ 13 13 14 + #include <linux/bitfield.h> 14 15 #include <linux/kernel.h> 15 16 #include <linux/init.h> 16 17 #include <linux/pci.h> ··· 223 222 224 223 int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus) 225 224 { 226 - int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0; 225 + int sub_bus, pci_devfn, pci_class, cmdstat; 227 226 unsigned short vid; 228 227 unsigned char header_type; 229 228 struct pci_dev *dev = &pciauto_dev; 229 + bool found_multi = false; 230 230 231 231 pciauto_dev.bus = &pciauto_bus; 232 232 pciauto_dev.sysdata = pci_ctrl; ··· 263 261 continue; 264 262 265 263 if (!PCI_FUNC(pci_devfn)) 266 - found_multi = header_type & 0x80; 264 + found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type); 267 265 pci_read_config_word(dev, PCI_VENDOR_ID, &vid); 268 266 269 267 if (vid == 0xffff || vid == 0x0000) { 270 - found_multi = 0; 268 + found_multi = false; 271 269 continue; 272 270 } 273 271