All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: Use header type defines in pci_setup_device()
Date: Wed, 6 Aug 2025 17:56:51 -0500	[thread overview]
Message-ID: <20250806225651.GA22936@bhelgaas> (raw)
In-Reply-To: <20250610105820.7126-1-ilpo.jarvinen@linux.intel.com>

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@linux.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
> 

      parent reply	other threads:[~2025-08-06 22:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-10 10:58 [PATCH 1/3] PCI: Use header type defines in pci_setup_device() Ilpo Järvinen
2025-06-10 10:58 ` [PATCH 2/3] PCI: Cleanup early_dump_pci_device() Ilpo Järvinen
2025-06-10 14:26   ` Sathyanarayanan Kuppuswamy
2025-06-10 10:58 ` [PATCH 3/3] PCI: Cleanup pci_scan_child_bus_extend() loop Ilpo Järvinen
2025-06-10 14:28   ` Sathyanarayanan Kuppuswamy
2025-06-10 14:26 ` [PATCH 1/3] PCI: Use header type defines in pci_setup_device() Sathyanarayanan Kuppuswamy
2025-08-06 22:56 ` Bjorn Helgaas [this message]

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=20250806225651.GA22936@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.