From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal
Date: Fri, 24 Nov 2023 11:09:14 +0200 [thread overview]
Message-ID: <20231124090919.23687-2-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com>
Replace 0x7f literals with PCI_HEADER_TYPE_MASK.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
arch/powerpc/sysdev/fsl_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 3868483fbe29..ef7707ea0db7 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -54,7 +54,7 @@ static void quirk_fsl_pcie_early(struct pci_dev *dev)
/* if we aren't in host mode don't bother */
pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type);
- if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
+ if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
return;
dev->class = PCI_CLASS_BRIDGE_PCI_NORMAL;
@@ -581,7 +581,7 @@ static int fsl_add_bridge(struct platform_device *pdev, int is_primary)
hose->ops = &fsl_indirect_pcie_ops;
/* For PCIE read HEADER_TYPE to identify controller mode */
early_read_config_byte(hose, 0, 0, PCI_HEADER_TYPE, &hdr_type);
- if ((hdr_type & 0x7f) != PCI_HEADER_TYPE_BRIDGE)
+ if ((hdr_type & PCI_HEADER_TYPE_MASK) != PCI_HEADER_TYPE_BRIDGE)
goto no_bridge;
} else {
--
2.30.2
next prev parent 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 [PATCH 1/6] x86: Use PCI_HEADER_TYPE_* instead of literals Ilpo Järvinen
2023-11-24 9:09 ` Ilpo Järvinen [this message]
2023-11-24 9:09 ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD instead of literal 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-2-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/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