Re: [PATCH v2 3/3] serial: 8250_pci: Replace dev_*() by pci_*() macros

From: Jiri Slaby
Date: Tue Oct 26 2021 - 01:21:02 EST


On 22. 10. 21, 15:51, Andy Shevchenko wrote:
PCI subsystem provides convenient shortcut macros for message printing.
Use those macros instead of dev_*().

Hopefully they are preferred by the PCI maintainer too :)...

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Reviewed-by: Jiri Slaby <jslaby@xxxxxxxxxx>

---
v2: dropped unrelated change (Joe)
drivers/tty/serial/8250/8250_pci.c | 52 +++++++++++++-----------------
1 file changed, 22 insertions(+), 30 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 463b2c71da6f..aea12263a1ff 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -75,13 +75,12 @@ static int pci_default_setup(struct serial_private*,
static void moan_device(const char *str, struct pci_dev *dev)
{
- dev_err(&dev->dev,
- "%s: %s\n"
+ pci_err(dev, "%s\n"
"Please send the output of lspci -vv, this\n"
"message (0x%04x,0x%04x,0x%04x,0x%04x), the\n"
"manufacturer and name of serial board or\n"
"modem board to <linux-serial@xxxxxxxxxxxxxxx>.\n",
- pci_name(dev), str, dev->vendor, dev->device,
+ str, dev->vendor, dev->device,
dev->subsystem_vendor, dev->subsystem_device);
}
...

--
js
suse labs