public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
@ 2023-11-24  9:09 Ilpo Järvinen
  2023-11-24  9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Ilpo Järvinen @ 2023-11-24  9:09 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Bjorn Helgaas, linux-kernel, linux-pci
  Cc: Ilpo Järvinen

Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 arch/x86/kernel/aperture_64.c  | 3 +--
 arch/x86/kernel/early-quirks.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 4feaa670d578..89c0c8a3fc7e 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -259,10 +259,9 @@ static u32 __init search_agp_bridge(u32 *order, int *valid_agp)
 							order);
 				}
 
-				/* No multi-function device? */
 				type = read_pci_config_byte(bus, slot, func,
 							       PCI_HEADER_TYPE);
-				if (!(type & 0x80))
+				if (!(type & PCI_HEADER_TYPE_MFD))
 					break;
 			}
 		}
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index a6c1867fc7aa..59f4aefc6bc1 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -779,13 +779,13 @@ static int __init check_dev_quirk(int num, int slot, int func)
 	type = read_pci_config_byte(num, slot, func,
 				    PCI_HEADER_TYPE);
 
-	if ((type & 0x7f) == PCI_HEADER_TYPE_BRIDGE) {
+	if ((type & PCI_HEADER_TYPE_MASK) == PCI_HEADER_TYPE_BRIDGE) {
 		sec = read_pci_config_byte(num, slot, func, PCI_SECONDARY_BUS);
 		if (sec > num)
 			early_pci_scan_bus(sec);
 	}
 
-	if (!(type & 0x80))
+	if (!(type & PCI_HEADER_TYPE_MFD))
 		return -1;
 
 	return 0;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-12-06  2:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-24  9:09 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
2023-11-24  9:09 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-24  9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " Ilpo Järvinen
2023-11-29 10:21   ` Max Filippov
2023-11-24  9:09 ` [PATCH 4/6] scsi: lpfc: " Ilpo Järvinen
2023-12-06  1:41   ` Martin K. Petersen
2023-11-24  9:09 ` [PATCH 5/6] EDAC: Use PCI_HEADER_TYPE_MASK instead of literals Ilpo Järvinen
2023-11-24 14:11   ` Borislav Petkov
2023-11-24  9:09 ` [PATCH 6/6] bcma: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-27  7:31   ` Kalle Valo
2023-11-28  9:43     ` Ilpo Järvinen
2023-11-30 19:21   ` Kalle Valo
2023-12-01 20:44 ` [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Bjorn Helgaas
2023-12-01 22:56   ` Bjorn Helgaas
2023-12-05  2:06     ` Michael Ellerman
2023-12-06  2:01     ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox