Skip to content

Commit 791beae

Browse files
ij-inteljcmvbkbc
authored andcommitted
xtensa: Use PCI_HEADER_TYPE_MFD instead of literal
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> Message-Id: <20231124090919.23687-3-ilpo.jarvinen@linux.intel.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
1 parent 6d638ab commit 791beae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/xtensa/lib/pci-auto.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Based on work from Matt Porter <mporter@mvista.com>
1212
*/
1313

14+
#include <linux/bitfield.h>
1415
#include <linux/kernel.h>
1516
#include <linux/init.h>
1617
#include <linux/pci.h>
@@ -222,10 +223,11 @@ pciauto_postscan_setup_bridge(struct pci_dev *dev, int current_bus, int sub_bus,
222223

223224
int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
224225
{
225-
int sub_bus, pci_devfn, pci_class, cmdstat, found_multi=0;
226+
int sub_bus, pci_devfn, pci_class, cmdstat;
226227
unsigned short vid;
227228
unsigned char header_type;
228229
struct pci_dev *dev = &pciauto_dev;
230+
bool found_multi = false;
229231

230232
pciauto_dev.bus = &pciauto_bus;
231233
pciauto_dev.sysdata = pci_ctrl;
@@ -261,11 +263,11 @@ int __init pciauto_bus_scan(struct pci_controller *pci_ctrl, int current_bus)
261263
continue;
262264

263265
if (!PCI_FUNC(pci_devfn))
264-
found_multi = header_type & 0x80;
266+
found_multi = FIELD_GET(PCI_HEADER_TYPE_MFD, header_type);
265267
pci_read_config_word(dev, PCI_VENDOR_ID, &vid);
266268

267269
if (vid == 0xffff || vid == 0x0000) {
268-
found_multi = 0;
270+
found_multi = false;
269271
continue;
270272
}
271273

0 commit comments

Comments
 (0)