public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Chris Zankel <chris@zankel.net>,
	Max Filippov <jcmvbkbc@gmail.com>,
	linux-kernel@vger.kernel.org
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
Date: Fri, 24 Nov 2023 11:09:15 +0200	[thread overview]
Message-ID: <20231124090919.23687-3-ilpo.jarvinen@linux.intel.com> (raw)
In-Reply-To: <20231124090919.23687-1-ilpo.jarvinen@linux.intel.com>

Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert
found_multi into boolean.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 arch/xtensa/lib/pci-auto.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/lib/pci-auto.c b/arch/xtensa/lib/pci-auto.c
index aa6752237985..05fc02f9e1c7 100644
--- a/arch/xtensa/lib/pci-auto.c
+++ b/arch/xtensa/lib/pci-auto.c
@@ -11,6 +11,7 @@
  * Based on work from Matt Porter <mporter@mvista.com>
  */
 
+#include <linux/bitfield.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/pci.h>
@@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus,
 
 int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
 {
-	int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0;
+	int sub_bus, pci_devfn, pci_class, cmdstat;
 	unsigned short vid;
 	unsigned char header_type;
 	struct pci_dev *dev = &pciauto_dev;
+	bool found_multi = false;
 
 	pciauto_dev.bus = &pciauto_bus;
 	pciauto_dev.sysdata = pci_ctrl;
@@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
 			continue;
 
 		if (!PCI_FUNC(pci_devfn))
-			found_multi = header_type & 0x80;
+			found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type);
 		pci_read_config_word(dev, PCI_VENDOR_ID, &vid);
 
 		if (vid == 0xffff || vid == 0x0000) {
-			found_multi = 0;
+			found_multi = false;
 			continue;
 		}
 
-- 
2.30.2


  parent reply	other threads:[~2023-11-24  9:10 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 ` [PATCH 2/6] powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Ilpo Järvinen
2023-11-24  9:09 ` Ilpo Järvinen [this message]
2023-11-29 10:21   ` [PATCH 3/6] xtensa: Use PCI_HEADER_TYPE_MFD " 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-3-ilpo.jarvinen@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=chris@zankel.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=linux-kernel@vger.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