[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250806225651.GA22936@bhelgaas>
Date: Wed, 6 Aug 2025 17:56:51 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: 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 Tue, Jun 10, 2025 at 01:58:18PM +0300, 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>
All three applied to pci/enumeration for v6.18, thanks!
> ---
> 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
> --
> 2.39.5
>
Powered by blists - more mailing lists