Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Keith Busch <kbusch@meta.com>,
	linux-pci@vger.kernel.org, helgaas@kernel.org, alex@shazbot.org,
	dan.j.williams@intel.com, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCHv4 2/3] pci: allow all bus devices to use the same slot
Date: Fri, 13 Feb 2026 07:10:11 -0700	[thread overview]
Message-ID: <aY8wwyH9BpFwzfxm@kbusch-mbp> (raw)
In-Reply-To: <da0a460b-2098-c9ce-a884-d4a8118638f9@linux.intel.com>

On Fri, Feb 13, 2026 at 09:26:35AM +0200, Ilpo Järvinen wrote:
> On Thu, 12 Feb 2026, Keith Busch wrote:
> > @@ -42,6 +42,15 @@ static ssize_t address_read_file(struct pci_slot *slot, char *buf)
> >  				  pci_domain_nr(slot->bus),
> >  				  slot->bus->number);
> >  
> > +	/*
> > +	 * Preserve legacy ABI expectations that hotplug drivers that manage
> > +	 * multiple devices per slot emit 0 for the device number.
> > +	 */
> > +	if (slot->number == PCI_SLOT_ALL_DEVICES)
> > +		return sysfs_emit(buf, "%04x:%02x:00\n",
> > +				  pci_domain_nr(slot->bus),
> > +				  slot->bus->number);
> 
> This fits to two lines.
> 
> Add braces as it's a multi-line block.

These suggestions clash with the local contentions of this function.
These lines are exact copy/paste from directly above it, with a tiny
modification for the legacy behavior. Not that I'm advocating for this
particular coding style, but consistency is preferred.

  reply	other threads:[~2026-02-13 14:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-12 22:41 [PATCHv4 0/3] pci slot reset handling fixes Keith Busch
2026-02-12 22:41 ` [PATCHv4 1/3] pci: rename __pci_bus_reset and __pci_slot_reset Keith Busch
2026-02-12 22:41 ` [PATCHv4 2/3] pci: allow all bus devices to use the same slot Keith Busch
2026-02-13  7:26   ` Ilpo Järvinen
2026-02-13 14:10     ` Keith Busch [this message]
2026-02-13  7:27   ` Ilpo Järvinen
2026-02-12 22:41 ` [PATCHv4 3/3] pci: make reset_subordinate hotplug safe Keith Busch
2026-02-13  3:41   ` dan.j.williams
2026-02-13  7:32   ` Ilpo Järvinen
2026-02-13 14:34     ` Keith Busch

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=aY8wwyH9BpFwzfxm@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=alex@shazbot.org \
    --cc=dan.j.williams@intel.com \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kbusch@meta.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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