mbox series

[0/3] PCI: add help pci_dev_id

Message ID b193514c-23d1-e090-7ddb-40371595f3a7@gmail.com
Headers show
Series PCI: add help pci_dev_id | expand

Message

Heiner Kallweit April 19, 2019, 6:27 p.m. UTC
In several places in the kernel we find PCI_DEVID used like this:
PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
for it.

Heiner Kallweit (3):
  PCI: add helper pci_dev_id
  PCI: use helper pci_dev_id
  r8169: use new helper pci_dev_id

 drivers/net/ethernet/realtek/r8169.c |  3 +--
 drivers/pci/msi.c                    |  6 +++---
 drivers/pci/search.c                 | 10 +++-------
 include/linux/pci.h                  |  5 +++++
 4 files changed, 12 insertions(+), 12 deletions(-)

Comments

David Miller April 19, 2019, 10:13 p.m. UTC | #1
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Fri, 19 Apr 2019 20:27:45 +0200

> In several places in the kernel we find PCI_DEVID used like this:
> PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
> for it.

I'll wait for an ACK from the PCI folks on patch #1.
Bjorn Helgaas April 22, 2019, 1:20 p.m. UTC | #2
On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote:
> From: Heiner Kallweit <hkallweit1@gmail.com>
> Date: Fri, 19 Apr 2019 20:27:45 +0200
> 
> > In several places in the kernel we find PCI_DEVID used like this:
> > PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
> > for it.
> 
> I'll wait for an ACK from the PCI folks on patch #1.

#1 and #2 touch PCI, #3 is a trivial r8169 patch.  There are a few
other places where this helper could be used (powernv/npu-dma.c,
amdkfd/kfd_topology.c, amd_iommu.c, intel-iommu.c,
intel_irq_remapping.c, stmmac_pci.c, chromeos_laptop.c).

I think it would be easier for me to collect acks for the trivial
changes to those places and merge the whole shebang via PCI.

Heiner, do you want to update those other places, too?

Bjorn
David Miller April 23, 2019, 4:09 a.m. UTC | #3
From: Bjorn Helgaas <helgaas@kernel.org>
Date: Mon, 22 Apr 2019 08:20:20 -0500

> On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote:
>> From: Heiner Kallweit <hkallweit1@gmail.com>
>> Date: Fri, 19 Apr 2019 20:27:45 +0200
>> 
>> > In several places in the kernel we find PCI_DEVID used like this:
>> > PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
>> > for it.
>> 
>> I'll wait for an ACK from the PCI folks on patch #1.
> 
> #1 and #2 touch PCI, #3 is a trivial r8169 patch.  There are a few
> other places where this helper could be used (powernv/npu-dma.c,
> amdkfd/kfd_topology.c, amd_iommu.c, intel-iommu.c,
> intel_irq_remapping.c, stmmac_pci.c, chromeos_laptop.c).
> 
> I think it would be easier for me to collect acks for the trivial
> changes to those places and merge the whole shebang via PCI.

That's fine with me, you can add my:

Acked-by: David S. Miller <davem@davemloft.net>
Heiner Kallweit April 23, 2019, 6:05 a.m. UTC | #4
On 22.04.2019 15:20, Bjorn Helgaas wrote:
> On Fri, Apr 19, 2019 at 03:13:38PM -0700, David Miller wrote:
>> From: Heiner Kallweit <hkallweit1@gmail.com>
>> Date: Fri, 19 Apr 2019 20:27:45 +0200
>>
>>> In several places in the kernel we find PCI_DEVID used like this:
>>> PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
>>> for it.
>>
>> I'll wait for an ACK from the PCI folks on patch #1.
> 
> #1 and #2 touch PCI, #3 is a trivial r8169 patch.  There are a few
> other places where this helper could be used (powernv/npu-dma.c,
> amdkfd/kfd_topology.c, amd_iommu.c, intel-iommu.c,
> intel_irq_remapping.c, stmmac_pci.c, chromeos_laptop.c).
> 
> I think it would be easier for me to collect acks for the trivial
> changes to those places and merge the whole shebang via PCI.
> 
> Heiner, do you want to update those other places, too?
> 
Yes, will do so.

> Bjorn
> 
Heiner