Skip to content

Commit 24b2d3c

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: Use header type defines in pci_setup_device()
Replace literals with PCI_HEADER_TYPE_* defines in pci_setup_device(). Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com> Link: https://patch.msgid.link/20250610105820.7126-1-ilpo.jarvinen@linux.intel.com
1 parent 8f5ae30 commit 24b2d3c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/pci/probe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,8 +1985,8 @@ int pci_setup_device(struct pci_dev *dev)
19851985
dev->sysdata = dev->bus->sysdata;
19861986
dev->dev.parent = dev->bus->bridge;
19871987
dev->dev.bus = &pci_bus_type;
1988-
dev->hdr_type = hdr_type & 0x7f;
1989-
dev->multifunction = !!(hdr_type & 0x80);
1988+
dev->hdr_type = FIELD_GET(PCI_HEADER_TYPE_MASK, hdr_type);
1989+
dev->multifunction = FIELD_GET(PCI_HEADER_TYPE_MFD, hdr_type);
19901990
dev->error_state = pci_channel_io_normal;
19911991
set_pcie_port_type(dev);
19921992

0 commit comments

Comments
 (0)