mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Bjorn Helgaas" <helgaas@kernel.org>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/4] pci: add pci_is_bridge() helper
Date: Thu, 21 May 2026 19:46:54 +0000	[thread overview]
Message-ID: <E1wQ9M6-00000004aRG-0Dzw@pty.whiteo.stw.pengutronix.de> (raw)
In-Reply-To: <20260521162355.GA168776@bhelgaas>

On 2026-05-21 11:23, Bjorn Helgaas wrote:
> > diff --git a/include/linux/pci.h b/include/linux/pci.h
> > index f6511e0095..a2dbaf6ec2 100644
> > --- a/include/linux/pci.h
> > +++ b/include/linux/pci.h
> > @@ -123,6 +123,20 @@ struct pci_dev {
> >  };
> >  #define	to_pci_dev(d) container_of(d, struct pci_dev, dev)
> >  
> > +/**
> > + * pci_is_bridge - check if the PCI device is a bridge
> > + * @dev: PCI device
> > + *
> > + * Return true if the PCI device is a bridge of PCI-to-PCI type. Masks the
> > + * multi-function flag so a multi-function bridge is still recognised.
> > + */
> > +static inline bool pci_is_bridge(struct pci_dev *dev)
> > +{
> > +	u8 type = dev->hdr_type & PCI_HEADER_TYPE_MASK;
> > +
> > +	return type == PCI_HEADER_TYPE_BRIDGE;
> > +}
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/pci.h?id=v7.0#n755
> 
> Am I missing something?

Yes. This is a barebox patch, not Linux. Is it a lei query that made you
stumble upon this?

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2026-05-21 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21  8:36 [PATCH 0/4] PCI: populate PCI host controller device nodes Sascha Hauer
2026-05-21  8:36 ` [PATCH 1/4] of: fall back to parent-prefixed encoding when address translation fails Sascha Hauer
2026-05-21  8:36 ` [PATCH 2/4] pci: fix DT node matching when reg encodes a non-zero bus number Sascha Hauer
2026-05-21  8:36 ` [PATCH 3/4] pci: add pci_is_bridge() helper Sascha Hauer
2026-05-21 16:23   ` Bjorn Helgaas
2026-05-21 19:46     ` Sascha Hauer [this message]
2026-05-21 20:53       ` Bjorn Helgaas
2026-05-21  8:36 ` [PATCH 4/4] pci: synthesize devicetree nodes for enumerated devices Sascha Hauer

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=E1wQ9M6-00000004aRG-0Dzw@pty.whiteo.stw.pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=helgaas@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