Skip to content

Commit 5f57b71

Browse files
ij-intelbp3tk0v
authored andcommitted
EDAC/pci_sysfs: Use PCI_HEADER_TYPE_MASK instead of literals
Replace literal 0x7f with PCI_HEADER_TYPE_MASK. No functional changes: $ sha1sum drivers/edac/edac_pci_sysfs.o.* 805b33a090d8019d8b3b348191f630c72c748c9c drivers/edac/edac_pci_sysfs.o.before 805b33a090d8019d8b3b348191f630c72c748c9c drivers/edac/edac_pci_sysfs.o.after Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20231124090919.23687-5-ilpo.jarvinen@linux.intel.com
1 parent 475c58e commit 5f57b71

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/edac/edac_pci_sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ static void edac_pci_dev_parity_clear(struct pci_dev *dev)
521521
/* read the device TYPE, looking for bridges */
522522
pci_read_config_byte(dev, PCI_HEADER_TYPE, &header_type);
523523

524-
if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE)
524+
if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE)
525525
get_pci_parity_status(dev, 1);
526526
}
527527

@@ -583,7 +583,7 @@ static void edac_pci_dev_parity_test(struct pci_dev *dev)
583583
edac_dbg(4, "PCI HEADER TYPE= 0x%02x %s\n",
584584
header_type, dev_name(&dev->dev));
585585

586-
if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
586+
if ((header_type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
587587
/* On bridges, need to examine secondary status register */
588588
status = get_pci_parity_status(dev, 1);
589589

0 commit comments

Comments
 (0)