lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/1] PCI: Introduce pci_bus_*() printing macros when device is not available
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


\
 
 \ /
  Last update: 2021-12-09 20:34    [W:0.040 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site