Re: [PATCH v2 1/1] PCI: Introduce pci_bus_*() printing macros when device is not available

From: Andy Shevchenko
Date: Thu Dec 09 2021 - 14:34:43 EST


On Thu, Dec 09, 2021 at 10:40:57AM -0800, Joe Perches wrote:
> On Thu, 2021-12-09 at 20:27 +0200, Andy Shevchenko wrote:

...

> > +#define pci_bus_printk(level, bus, devfn, fmt, arg...) \
> > + printk(level "pci %04x:%02x:%02x.%d: " fmt, \
> > + pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), ##arg)
>
> I have a small preference for using ... and __VA_ARGS___

It contradicts what other macros in the pci.h do.
So I will stick with current solution for the sake of consistency.

...

> and likely this should have parentheses around bus
>
> printk(level "pci %04x:%02x:%02x.%d: " fmt, \
> pci_domain_nr(bus), (bus)->number, PCI_SLOT(devfn), PCI_FUNC(devfn), ##__VA_ARGS__)

This makes sense, thanks!

--
With Best Regards,
Andy Shevchenko