Re: [PATCH 1/4] pci: Add PCI_BUS() and PCI_DEVID() interfaces to return bus number and device id

Shuah Khan
2013-02-27T21:48:30Z

On Mon, 2013-02-25 at 14:53 -0700, Shuah Khan wrote:
> On Mon, 2013-02-25 at 14:23 -0700, Bjorn Helgaas wrote:
> > On Mon, Feb 25, 2013 at 9:37 AM, Shuah Khan <shuah.khan@hp.com> wrote:
> > > On Wed, 2013-02-20 at 18:19 -0700, Bjorn Helgaas wrote:
> > >> On Mon, Feb 11, 2013 at 4:00 PM, Shuah Khan <shuah.khan@hp.com> wrote:

> >
> > It's not nice and consistent, but it does follow the simple rule of
> > "don't expose things to user-space unnecessarily." We might want to
> > add a comment to keep somebody from cleaning it up later.
>
> ok. Will resend patches adding the new defines to linux/pci.h and
> renaming PCI_BUS() to PCI_BUS_NR() or PCI_BUS_NUM() like you suggested.
>
> Thanks,
> -- Shuah
>

Bjorn/Joerg,

I added PCI_BUS_NUM() amd PCI_DEVID() to linux/pci.h. Please note that
changing PCI_BUS() to PCI_BUS_NUM() required additional changes to AMD
IOMMU source files and aer driver. Essentially in addition to removing
local PCI_BUS() define, PCI_BUS() usages are changed to PCI_BUS_NUM(). I
am resending the patches.

Thanks,
-- Shuah