Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: Replace dev_printk(KERN_DEBUG) with dev_info(), etc

Replace dev_printk(KERN_DEBUG) with dev_info(), etc to be more consistent
with other logging and avoid checkpatch warnings.

The KERN_DEBUG messages could be converted to dev_dbg(), but that depends
on CONFIG_DYNAMIC_DEBUG and DEBUG, and we want most of these messages to
*always* be in the dmesg log.

Link: https://lore.kernel.org/lkml/1555733240-19875-1-git-send-email-mohankumar718@gmail.com
Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Mohan Kumar and committed by
Bjorn Helgaas
34c6b710 25da8dba

+40 -48
+1 -2
drivers/pci/bus.c
··· 288 288 res->end = end; 289 289 res->flags &= ~IORESOURCE_UNSET; 290 290 orig_res.flags &= ~IORESOURCE_UNSET; 291 - pci_printk(KERN_DEBUG, dev, "%pR clipped to %pR\n", 292 - &orig_res, res); 291 + pci_info(dev, "%pR clipped to %pR\n", &orig_res, res); 293 292 294 293 return true; 295 294 }
+7 -7
drivers/pci/pci.c
··· 2777 2777 dev->d2_support = true; 2778 2778 2779 2779 if (dev->d1_support || dev->d2_support) 2780 - pci_printk(KERN_DEBUG, dev, "supports%s%s\n", 2780 + pci_info(dev, "supports%s%s\n", 2781 2781 dev->d1_support ? " D1" : "", 2782 2782 dev->d2_support ? " D2" : ""); 2783 2783 } 2784 2784 2785 2785 pmc &= PCI_PM_CAP_PME_MASK; 2786 2786 if (pmc) { 2787 - pci_printk(KERN_DEBUG, dev, "PME# supported from%s%s%s%s%s\n", 2787 + pci_info(dev, "PME# supported from%s%s%s%s%s\n", 2788 2788 (pmc & PCI_PM_CAP_PME_D0) ? " D0" : "", 2789 2789 (pmc & PCI_PM_CAP_PME_D1) ? " D1" : "", 2790 2790 (pmc & PCI_PM_CAP_PME_D2) ? " D2" : "", ··· 2952 2952 res->flags = flags; 2953 2953 2954 2954 if (bei <= PCI_EA_BEI_BAR5) 2955 - pci_printk(KERN_DEBUG, dev, "BAR %d: %pR (from Enhanced Allocation, properties %#02x)\n", 2955 + pci_info(dev, "BAR %d: %pR (from Enhanced Allocation, properties %#02x)\n", 2956 2956 bei, res, prop); 2957 2957 else if (bei == PCI_EA_BEI_ROM) 2958 - pci_printk(KERN_DEBUG, dev, "ROM: %pR (from Enhanced Allocation, properties %#02x)\n", 2958 + pci_info(dev, "ROM: %pR (from Enhanced Allocation, properties %#02x)\n", 2959 2959 res, prop); 2960 2960 else if (bei >= PCI_EA_BEI_VF_BAR0 && bei <= PCI_EA_BEI_VF_BAR5) 2961 - pci_printk(KERN_DEBUG, dev, "VF BAR %d: %pR (from Enhanced Allocation, properties %#02x)\n", 2961 + pci_info(dev, "VF BAR %d: %pR (from Enhanced Allocation, properties %#02x)\n", 2962 2962 bei - PCI_EA_BEI_VF_BAR0, res, prop); 2963 2963 else 2964 - pci_printk(KERN_DEBUG, dev, "BEI %d res: %pR (from Enhanced Allocation, properties %#02x)\n", 2964 + pci_info(dev, "BEI %d res: %pR (from Enhanced Allocation, properties %#02x)\n", 2965 2965 bei, res, prop); 2966 2966 2967 2967 out: ··· 4185 4185 if (cacheline_size == pci_cache_line_size) 4186 4186 return 0; 4187 4187 4188 - pci_printk(KERN_DEBUG, dev, "cache line size of %d is not supported\n", 4188 + pci_info(dev, "cache line size of %d is not supported\n", 4189 4189 pci_cache_line_size << 2); 4190 4190 4191 4191 return -EINVAL;
+9 -12
drivers/pci/probe.c
··· 317 317 res->flags = 0; 318 318 out: 319 319 if (res->flags) 320 - pci_printk(KERN_DEBUG, dev, "reg 0x%x: %pR\n", pos, res); 320 + pci_info(dev, "reg 0x%x: %pR\n", pos, res); 321 321 322 322 return (res->flags & IORESOURCE_MEM_64) ? 1 : 0; 323 323 } ··· 435 435 region.start = base; 436 436 region.end = limit + io_granularity - 1; 437 437 pcibios_bus_to_resource(dev->bus, res, &region); 438 - pci_printk(KERN_DEBUG, dev, " bridge window %pR\n", res); 438 + pci_info(dev, " bridge window %pR\n", res); 439 439 } 440 440 } 441 441 ··· 457 457 region.start = base; 458 458 region.end = limit + 0xfffff; 459 459 pcibios_bus_to_resource(dev->bus, res, &region); 460 - pci_printk(KERN_DEBUG, dev, " bridge window %pR\n", res); 460 + pci_info(dev, " bridge window %pR\n", res); 461 461 } 462 462 } 463 463 ··· 510 510 region.start = base; 511 511 region.end = limit + 0xfffff; 512 512 pcibios_bus_to_resource(dev->bus, res, &region); 513 - pci_printk(KERN_DEBUG, dev, " bridge window %pR\n", res); 513 + pci_info(dev, " bridge window %pR\n", res); 514 514 } 515 515 } 516 516 ··· 540 540 if (res && res->flags) { 541 541 pci_bus_add_resource(child, res, 542 542 PCI_SUBTRACTIVE_DECODE); 543 - pci_printk(KERN_DEBUG, dev, 544 - " bridge window %pR (subtractive decode)\n", 543 + pci_info(dev, " bridge window %pR (subtractive decode)\n", 545 544 res); 546 545 } 547 546 } ··· 1689 1690 dev->revision = class & 0xff; 1690 1691 dev->class = class >> 8; /* upper 3 bytes */ 1691 1692 1692 - pci_printk(KERN_DEBUG, dev, "[%04x:%04x] type %02x class %#08x\n", 1693 + pci_info(dev, "[%04x:%04x] type %02x class %#08x\n", 1693 1694 dev->vendor, dev->device, dev->hdr_type, dev->class); 1694 1695 1695 1696 if (pci_early_dump) ··· 3085 3086 conflict = request_resource_conflict(parent_res, res); 3086 3087 3087 3088 if (conflict) 3088 - dev_printk(KERN_DEBUG, &b->dev, 3089 + dev_info(&b->dev, 3089 3090 "busn_res: can not insert %pR under %s%pR (conflicts with %s %pR)\n", 3090 3091 res, pci_is_root_bus(b) ? "domain " : "", 3091 3092 parent_res, conflict->name, conflict); ··· 3105 3106 3106 3107 size = bus_max - res->start + 1; 3107 3108 ret = adjust_resource(res, res->start, size); 3108 - dev_printk(KERN_DEBUG, &b->dev, 3109 - "busn_res: %pR end %s updated to %02x\n", 3109 + dev_info(&b->dev, "busn_res: %pR end %s updated to %02x\n", 3110 3110 &old_res, ret ? "can not be" : "is", bus_max); 3111 3111 3112 3112 if (!ret && !res->parent) ··· 3123 3125 return; 3124 3126 3125 3127 ret = release_resource(res); 3126 - dev_printk(KERN_DEBUG, &b->dev, 3127 - "busn_res: %pR %s released\n", 3128 + dev_info(&b->dev, "busn_res: %pR %s released\n", 3128 3129 res, ret ? "can not be" : "is"); 3129 3130 } 3130 3131
+6 -7
drivers/pci/quirks.c
··· 159 159 u8 tmp; 160 160 161 161 if (pci_cache_line_size) 162 - printk(KERN_DEBUG "PCI: CLS %u bytes\n", 163 - pci_cache_line_size << 2); 162 + pr_info("PCI: CLS %u bytes\n", pci_cache_line_size << 2); 164 163 165 164 pci_apply_fixup_final_quirks = true; 166 165 for_each_pci_dev(dev) { ··· 176 177 if (!tmp || cls == tmp) 177 178 continue; 178 179 179 - pci_printk(KERN_DEBUG, dev, "CLS mismatch (%u != %u), using %u bytes\n", 180 - cls << 2, tmp << 2, 181 - pci_dfl_cache_line_size << 2); 180 + pci_info(dev, "CLS mismatch (%u != %u), using %u bytes\n", 181 + cls << 2, tmp << 2, 182 + pci_dfl_cache_line_size << 2); 182 183 pci_cache_line_size = pci_dfl_cache_line_size; 183 184 } 184 185 } 185 186 186 187 if (!pci_cache_line_size) { 187 - printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n", 188 - cls << 2, pci_dfl_cache_line_size << 2); 188 + pr_info("PCI: CLS %u bytes, default %u\n", cls << 2, 189 + pci_dfl_cache_line_size << 2); 189 190 pci_cache_line_size = cls ? cls : pci_dfl_cache_line_size; 190 191 } 191 192
+14 -16
drivers/pci/setup-bus.c
··· 255 255 (IORESOURCE_STARTALIGN|IORESOURCE_SIZEALIGN); 256 256 if (pci_reassign_resource(add_res->dev, idx, 257 257 add_size, align)) 258 - pci_printk(KERN_DEBUG, add_res->dev, 259 - "failed to add %llx res[%d]=%pR\n", 260 - (unsigned long long)add_size, 261 - idx, res); 258 + pci_info(add_res->dev, "failed to add %llx res[%d]=%pR\n", 259 + (unsigned long long) add_size, idx, 260 + res); 262 261 } 263 262 out: 264 263 list_del(&add_res->list); ··· 917 918 if (size1 > size0 && realloc_head) { 918 919 add_to_list(realloc_head, bus->self, b_res, size1-size0, 919 920 min_align); 920 - pci_printk(KERN_DEBUG, bus->self, "bridge window %pR to %pR add_size %llx\n", 921 - b_res, &bus->busn_res, 922 - (unsigned long long)size1-size0); 921 + pci_info(bus->self, "bridge window %pR to %pR add_size %llx\n", 922 + b_res, &bus->busn_res, 923 + (unsigned long long) size1 - size0); 923 924 } 924 925 } 925 926 ··· 1062 1063 b_res->flags |= IORESOURCE_STARTALIGN; 1063 1064 if (size1 > size0 && realloc_head) { 1064 1065 add_to_list(realloc_head, bus->self, b_res, size1-size0, add_align); 1065 - pci_printk(KERN_DEBUG, bus->self, "bridge window %pR to %pR add_size %llx add_align %llx\n", 1066 + pci_info(bus->self, "bridge window %pR to %pR add_size %llx add_align %llx\n", 1066 1067 b_res, &bus->busn_res, 1067 1068 (unsigned long long) (size1 - size0), 1068 1069 (unsigned long long) add_align); ··· 1530 1531 release_child_resources(r); 1531 1532 if (!release_resource(r)) { 1532 1533 type = old_flags = r->flags & PCI_RES_TYPE_MASK; 1533 - pci_printk(KERN_DEBUG, dev, "resource %d %pR released\n", 1534 - PCI_BRIDGE_RESOURCES + idx, r); 1534 + pci_info(dev, "resource %d %pR released\n", 1535 + PCI_BRIDGE_RESOURCES + idx, r); 1535 1536 /* keep the old size */ 1536 1537 r->end = resource_size(r) - 1; 1537 1538 r->start = 0; ··· 1595 1596 if (!res || !res->end || !res->flags) 1596 1597 continue; 1597 1598 1598 - dev_printk(KERN_DEBUG, &bus->dev, "resource %d %pR\n", i, res); 1599 + dev_info(&bus->dev, "resource %d %pR\n", i, res); 1599 1600 } 1600 1601 } 1601 1602 ··· 1729 1730 int max_depth = pci_bus_get_depth(bus); 1730 1731 1731 1732 pci_try_num = max_depth + 1; 1732 - dev_printk(KERN_DEBUG, &bus->dev, 1733 - "max bus depth: %d pci_try_num: %d\n", 1734 - max_depth, pci_try_num); 1733 + dev_info(&bus->dev, "max bus depth: %d pci_try_num: %d\n", 1734 + max_depth, pci_try_num); 1735 1735 } 1736 1736 1737 1737 again: ··· 1764 1766 goto dump; 1765 1767 } 1766 1768 1767 - dev_printk(KERN_DEBUG, &bus->dev, 1768 - "No. %d try to assign unassigned res\n", tried_times + 1); 1769 + dev_info(&bus->dev, "No. %d try to assign unassigned res\n", 1770 + tried_times + 1); 1769 1771 1770 1772 /* third times and later will not check if it is leaf */ 1771 1773 if ((tried_times + 1) > 2)
+3 -4
drivers/pci/xen-pcifront.c
··· 291 291 vector[i] = op.msix_entries[i].vector; 292 292 } 293 293 } else { 294 - printk(KERN_DEBUG "enable msix get value %x\n", 295 - op.value); 294 + pr_info("enable msix get value %x\n", op.value); 296 295 err = op.value; 297 296 } 298 297 } else { ··· 363 364 err = do_pci_op(pdev, &op); 364 365 if (err == XEN_PCI_ERR_dev_not_found) { 365 366 /* XXX No response from backend, what shall we do? */ 366 - printk(KERN_DEBUG "get no response from backend for disable MSI\n"); 367 + pr_info("get no response from backend for disable MSI\n"); 367 368 return; 368 369 } 369 370 if (err) 370 371 /* how can pciback notify us fail? */ 371 - printk(KERN_DEBUG "get fake response frombackend\n"); 372 + pr_info("get fake response from backend\n"); 372 373 } 373 374 374 375 static struct xen_pci_frontend_ops pci_frontend_ops = {