Skip to content

Commit 3773343

Browse files
ij-intelbjorn-helgaas
authored andcommitted
powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal
Replace 0x7f literals with PCI_HEADER_TYPE_MASK. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 197e0da commit 3773343

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/powerpc/sysdev/fsl_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev)
5454

5555
/* if we aren't in host mode don't bother */
5656
pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
57-
if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
57+
if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
5858
return;
5959

6060
dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL;
@@ -581,7 +581,7 @@ static int fsl_add_bridge(struct platform_device *pdev, int is_primary)
581581
hose->ops = &fsl_indirect_pcie_ops;
582582
/* For PCIE read HEADER_TYPE to identify controller mode */
583583
early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type);
584-
if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
584+
if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
585585
goto no_bridge;
586586

587587
} else {

0 commit comments

Comments
 (0)