[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00847d0e-d231-45df-83b3-8a6f5db4d008@linux.intel.com>
Date: Tue, 10 Jun 2025 07:26:47 -0700
From: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@...ux.intel.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Krzysztof Wilczyński <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] PCI: Use header type defines in pci_setup_device()
On 6/10/25 3:58 AM, Ilpo Järvinen wrote:
> Replace literals with PCI_HEADER_TYPE_* defines in pci_setup_device().
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> ---
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
> drivers/pci/probe.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 4b8693ec9e4c..c00634e5a2ed 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -1985,8 +1985,8 @@ int pci_setup_device(struct pci_dev *dev)
> dev->sysdata = dev->bus->sysdata;
> dev->dev.parent = dev->bus->bridge;
> dev->dev.bus = &pci_bus_type;
> - dev->hdr_type = hdr_type & 0x7f;
> - dev->multifunction = !!(hdr_type & 0x80);
> + dev->hdr_type = FIELD_GET(PCI_HEADER_TYPE_MASK, hdr_type);
> + dev->multifunction = FIELD_GET(PCI_HEADER_TYPE_MFD, hdr_type);
> dev->error_state = pci_channel_io_normal;
> set_pcie_port_type(dev);
>
>
> base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer
Powered by blists - more mailing lists