Re: [PATCH v2 6/9] PCI: hotplug: Prefix dmesg logs with PCIe service name

From: Andy Shevchenko
Date: Mon May 06 2019 - 04:30:24 EST


On Fri, May 03, 2019 at 03:04:37PM -0500, Bjorn Helgaas wrote:
> On Thu, May 02, 2019 at 10:59:43PM -0500, Frederick Lawler wrote:

> > +#define pr_fmt(fmt) "pciehp: " fmt
> > +#define dev_fmt pr_fmt
>
> Can these go in pciehp.h?

In general, no, it can't. The pr_fmt() / dev_fmt() macro must precede any
header inclusion, thus it makes them position dependent.

Otherwise, one has to guarantee above by accurately keeping a header inclusion
ordering.

--
With Best Regards,
Andy Shevchenko