From d19cc1119f64d04b33134925e602d29709d7577e Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 4 Jul 2021 11:41:31 +0200 Subject: [PATCH] device: Reflow strings in printk statements To ease finding some log messages, reflow their strings to use one line. Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical. Change-Id: I5284429ca6d07debf2d6c4fdbffa286140fb7694 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/56057 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Nico Huber --- src/device/device_util.c | 4 ++-- src/device/pci_device.c | 21 ++++++++++----------- src/device/pci_rom.c | 26 +++++++++++++------------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/device/device_util.c b/src/device/device_util.c index a5d1860064..8ee8afce27 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -870,8 +870,8 @@ void mmconf_resource(struct device *dev, unsigned long index) resource->flags = IORESOURCE_MEM | IORESOURCE_RESERVE | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; - printk(BIOS_DEBUG, "Adding PCIe enhanced config space BAR " - "0x%08lx-0x%08lx.\n", (unsigned long)(resource->base), + printk(BIOS_DEBUG, "Adding PCIe enhanced config space BAR 0x%08lx-0x%08lx.\n", + (unsigned long)(resource->base), (unsigned long)(resource->base + resource->size)); } diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 63c1dc522a..4b5e73b806 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -149,8 +149,7 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index) */ if (moving == 0) { if (value != 0) { - printk(BIOS_DEBUG, "%s register %02lx(%08lx), " - "read-only ignoring it\n", + printk(BIOS_DEBUG, "%s register %02lx(%08lx), read-only ignoring it\n", dev_path(dev), index, value); } resource->flags = 0; @@ -234,8 +233,7 @@ static void pci_get_rom_resource(struct device *dev, unsigned long index) resource->flags |= IORESOURCE_MEM | IORESOURCE_READONLY; } else { if (value != 0) { - printk(BIOS_DEBUG, "%s register %02lx(%08lx), " - "read-only ignoring it\n", + printk(BIOS_DEBUG, "%s register %02lx(%08lx), read-only ignoring it\n", dev_path(dev), index, value); } resource->flags = 0; @@ -512,8 +510,8 @@ static void pci_set_resource(struct device *dev, struct resource *resource) we can treat it like an empty resource. */ resource->size = 0; } else { - printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx not " - "assigned\n", dev_path(dev), resource->index, + printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx not assigned\n", + dev_path(dev), resource->index, resource_type(resource), resource->size); return; } @@ -980,9 +978,9 @@ static void set_pci_ops(struct device *dev) default: bad: if (dev->enabled) { - printk(BIOS_ERR, "%s [%04x/%04x/%06x] has unknown " - "header type %02x, ignoring.\n", dev_path(dev), - dev->vendor, dev->device, + printk(BIOS_ERR, + "%s [%04x/%04x/%06x] has unknown header type %02x, ignoring.\n", + dev_path(dev), dev->vendor, dev->device, dev->class >> 8, dev->hdr_type); } } @@ -1107,8 +1105,9 @@ struct device *pci_probe_dev(struct device *dev, struct bus *bus, if ((id == 0xffffffff) || (id == 0x00000000) || (id == 0x0000ffff) || (id == 0xffff0000)) { if (dev->enabled) { - printk(BIOS_INFO, "PCI: Static device %s not " - "found, disabling it.\n", dev_path(dev)); + printk(BIOS_INFO, + "PCI: Static device %s not found, disabling it.\n", + dev_path(dev)); dev->enabled = 0; } return dev; diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c index 663895c2ce..334d99be8f 100644 --- a/src/device/pci_rom.c +++ b/src/device/pci_rom.c @@ -78,14 +78,14 @@ struct rom_header *pci_rom_probe(const struct device *dev) rom_header = (struct rom_header *)rom_address; } - printk(BIOS_SPEW, "PCI expansion ROM, signature 0x%04x, " - "INIT size 0x%04x, data ptr 0x%04x\n", + printk(BIOS_SPEW, + "PCI expansion ROM, signature 0x%04x, INIT size 0x%04x, data ptr 0x%04x\n", le32_to_cpu(rom_header->signature), rom_header->size * 512, le32_to_cpu(rom_header->data)); if (le32_to_cpu(rom_header->signature) != PCI_ROM_HDR) { - printk(BIOS_ERR, "Incorrect expansion ROM header " - "signature %04x\n", le32_to_cpu(rom_header->signature)); + printk(BIOS_ERR, "Incorrect expansion ROM header signature %04x\n", + le32_to_cpu(rom_header->signature)); return NULL; } @@ -97,13 +97,13 @@ struct rom_header *pci_rom_probe(const struct device *dev) if ((dev->vendor != rom_data->vendor || dev->device != rom_data->device) && (vendev == mapped_vendev)) { - printk(BIOS_ERR, "ID mismatch: vendor ID %04x, " - "device ID %04x\n", dev->vendor, dev->device); + printk(BIOS_ERR, "ID mismatch: vendor ID %04x, device ID %04x\n", + dev->vendor, dev->device); return NULL; } - printk(BIOS_SPEW, "PCI ROM image, Class Code %04x%02x, " - "Code Type %02x\n", rom_data->class_hi, rom_data->class_lo, + printk(BIOS_SPEW, "PCI ROM image, Class Code %04x%02x, Code Type %02x\n", + rom_data->class_hi, rom_data->class_lo, rom_data->type); if (dev->class != ((rom_data->class_hi << 8) | rom_data->class_lo)) { @@ -152,17 +152,17 @@ struct rom_header *pci_rom_load(struct device *dev, if (dev != vga_pri) return NULL; /* Only one VGA supported. */ #endif if ((void *)PCI_VGA_RAM_IMAGE_START != rom_header) { - printk(BIOS_DEBUG, "Copying VGA ROM Image from %p to " - "0x%x, 0x%x bytes\n", rom_header, - PCI_VGA_RAM_IMAGE_START, rom_size); + printk(BIOS_DEBUG, + "Copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n", + rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); } return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START); } - printk(BIOS_DEBUG, "Copying non-VGA ROM image from %p to %p, 0x%x " - "bytes\n", rom_header, pci_ram_image_start, rom_size); + printk(BIOS_DEBUG, "Copying non-VGA ROM image from %p to %p, 0x%x bytes\n", + rom_header, pci_ram_image_start, rom_size); memcpy(pci_ram_image_start, rom_header, rom_size); pci_ram_image_start += rom_size;