lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Dec 2021 21:33:40 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Joe Perches <joe@...ches.com>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jean Delvare <jdelvare@...e.de>
Subject: Re: [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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ