From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals
Date: Fri, 24 Nov 2023 11:09:13 +0200 [thread overview]
Message-ID: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com> (raw)
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
next reply other threads:[~2023-11-24 9:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 9:09 Ilpo Järvinen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231124090919.23687-1-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox