diff options
author | Mohan Kumar <mohankumar718@gmail.com> | 2019-04-20 00:07:20 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-05-09 08:49:58 -0400 |
commit | 34c6b7105e5a11174f856483cde8ad6e61b7236a (patch) | |
tree | a4fcbb148402bfcaf5b1aa1c662e87466aac4e82 | |
parent | 25da8dbaaf0679b3b22c783952a8392071cfa135 (diff) |
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>
-rw-r--r-- | drivers/pci/bus.c | 3 | ||||
-rw-r--r-- | drivers/pci/pci.c | 14 | ||||
-rw-r--r-- | drivers/pci/probe.c | 21 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 13 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 30 | ||||
-rw-r--r-- | drivers/pci/xen-pcifront.c | 7 |
6 files changed, 40 insertions, 48 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 2179a8baef52..495059d923f7 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -288,8 +288,7 @@ bool pci_bus_clip_resource(struct pci_dev *dev, int idx) | |||
288 | res->end = end; | 288 | res->end = end; |
289 | res->flags &= ~IORESOURCE_UNSET; | 289 | res->flags &= ~IORESOURCE_UNSET; |
290 | orig_res.flags &= ~IORESOURCE_UNSET; | 290 | orig_res.flags &= ~IORESOURCE_UNSET; |
291 | pci_printk(KERN_DEBUG, dev, "%pR clipped to %pR\n", | 291 | pci_info(dev, "%pR clipped to %pR\n", &orig_res, res); |
292 | &orig_res, res); | ||
293 | 292 | ||
294 | return true; | 293 | return true; |
295 | } | 294 | } |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 225145ba4cf3..2d6d857a3d67 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -2777,14 +2777,14 @@ void pci_pm_init(struct pci_dev *dev) | |||
2777 | dev->d2_support = true; | 2777 | dev->d2_support = true; |
2778 | 2778 | ||
2779 | if (dev->d1_support || dev->d2_support) | 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 | dev->d1_support ? " D1" : "", | 2781 | dev->d1_support ? " D1" : "", |
2782 | dev->d2_support ? " D2" : ""); | 2782 | dev->d2_support ? " D2" : ""); |
2783 | } | 2783 | } |
2784 | 2784 | ||
2785 | pmc &= PCI_PM_CAP_PME_MASK; | 2785 | pmc &= PCI_PM_CAP_PME_MASK; |
2786 | if (pmc) { | 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 | (pmc & PCI_PM_CAP_PME_D0) ? " D0" : "", | 2788 | (pmc & PCI_PM_CAP_PME_D0) ? " D0" : "", |
2789 | (pmc & PCI_PM_CAP_PME_D1) ? " D1" : "", | 2789 | (pmc & PCI_PM_CAP_PME_D1) ? " D1" : "", |
2790 | (pmc & PCI_PM_CAP_PME_D2) ? " D2" : "", | 2790 | (pmc & PCI_PM_CAP_PME_D2) ? " D2" : "", |
@@ -2952,16 +2952,16 @@ static int pci_ea_read(struct pci_dev *dev, int offset) | |||
2952 | res->flags = flags; | 2952 | res->flags = flags; |
2953 | 2953 | ||
2954 | if (bei <= PCI_EA_BEI_BAR5) | 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 | bei, res, prop); | 2956 | bei, res, prop); |
2957 | else if (bei == PCI_EA_BEI_ROM) | 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 | res, prop); | 2959 | res, prop); |
2960 | else if (bei >= PCI_EA_BEI_VF_BAR0 && bei <= PCI_EA_BEI_VF_BAR5) | 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 | bei - PCI_EA_BEI_VF_BAR0, res, prop); | 2962 | bei - PCI_EA_BEI_VF_BAR0, res, prop); |
2963 | else | 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 | bei, res, prop); | 2965 | bei, res, prop); |
2966 | 2966 | ||
2967 | out: | 2967 | out: |
@@ -4185,7 +4185,7 @@ int pci_set_cacheline_size(struct pci_dev *dev) | |||
4185 | if (cacheline_size == pci_cache_line_size) | 4185 | if (cacheline_size == pci_cache_line_size) |
4186 | return 0; | 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 | pci_cache_line_size << 2); | 4189 | pci_cache_line_size << 2); |
4190 | 4190 | ||
4191 | return -EINVAL; | 4191 | return -EINVAL; |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2ec0df04e0dc..ac89f4d7a22a 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -317,7 +317,7 @@ fail: | |||
317 | res->flags = 0; | 317 | res->flags = 0; |
318 | out: | 318 | out: |
319 | if (res->flags) | 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 | return (res->flags & IORESOURCE_MEM_64) ? 1 : 0; | 322 | return (res->flags & IORESOURCE_MEM_64) ? 1 : 0; |
323 | } | 323 | } |
@@ -435,7 +435,7 @@ static void pci_read_bridge_io(struct pci_bus *child) | |||
435 | region.start = base; | 435 | region.start = base; |
436 | region.end = limit + io_granularity - 1; | 436 | region.end = limit + io_granularity - 1; |
437 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 437 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
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,7 +457,7 @@ static void pci_read_bridge_mmio(struct pci_bus *child) | |||
457 | region.start = base; | 457 | region.start = base; |
458 | region.end = limit + 0xfffff; | 458 | region.end = limit + 0xfffff; |
459 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 459 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
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,7 +510,7 @@ static void pci_read_bridge_mmio_pref(struct pci_bus *child) | |||
510 | region.start = base; | 510 | region.start = base; |
511 | region.end = limit + 0xfffff; | 511 | region.end = limit + 0xfffff; |
512 | pcibios_bus_to_resource(dev->bus, res, ®ion); | 512 | pcibios_bus_to_resource(dev->bus, res, ®ion); |
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,8 +540,7 @@ void pci_read_bridge_bases(struct pci_bus *child) | |||
540 | if (res && res->flags) { | 540 | if (res && res->flags) { |
541 | pci_bus_add_resource(child, res, | 541 | pci_bus_add_resource(child, res, |
542 | PCI_SUBTRACTIVE_DECODE); | 542 | PCI_SUBTRACTIVE_DECODE); |
543 | pci_printk(KERN_DEBUG, dev, | 543 | pci_info(dev, " bridge window %pR (subtractive decode)\n", |
544 | " bridge window %pR (subtractive decode)\n", | ||
545 | res); | 544 | res); |
546 | } | 545 | } |
547 | } | 546 | } |
@@ -1690,7 +1689,7 @@ int pci_setup_device(struct pci_dev *dev) | |||
1690 | dev->revision = class & 0xff; | 1689 | dev->revision = class & 0xff; |
1691 | dev->class = class >> 8; /* upper 3 bytes */ | 1690 | dev->class = class >> 8; /* upper 3 bytes */ |
1692 | 1691 | ||
1693 | pci_printk(KERN_DEBUG, dev, "[%04x:%04x] type %02x class %#08x\n", | 1692 | pci_info(dev, "[%04x:%04x] type %02x class %#08x\n", |
1694 | dev->vendor, dev->device, dev->hdr_type, dev->class); | 1693 | dev->vendor, dev->device, dev->hdr_type, dev->class); |
1695 | 1694 | ||
1696 | if (pci_early_dump) | 1695 | if (pci_early_dump) |
@@ -3086,7 +3085,7 @@ int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max) | |||
3086 | conflict = request_resource_conflict(parent_res, res); | 3085 | conflict = request_resource_conflict(parent_res, res); |
3087 | 3086 | ||
3088 | if (conflict) | 3087 | if (conflict) |
3089 | dev_printk(KERN_DEBUG, &b->dev, | 3088 | dev_info(&b->dev, |
3090 | "busn_res: can not insert %pR under %s%pR (conflicts with %s %pR)\n", | 3089 | "busn_res: can not insert %pR under %s%pR (conflicts with %s %pR)\n", |
3091 | res, pci_is_root_bus(b) ? "domain " : "", | 3090 | res, pci_is_root_bus(b) ? "domain " : "", |
3092 | parent_res, conflict->name, conflict); | 3091 | parent_res, conflict->name, conflict); |
@@ -3106,8 +3105,7 @@ int pci_bus_update_busn_res_end(struct pci_bus *b, int bus_max) | |||
3106 | 3105 | ||
3107 | size = bus_max - res->start + 1; | 3106 | size = bus_max - res->start + 1; |
3108 | ret = adjust_resource(res, res->start, size); | 3107 | ret = adjust_resource(res, res->start, size); |
3109 | dev_printk(KERN_DEBUG, &b->dev, | 3108 | dev_info(&b->dev, "busn_res: %pR end %s updated to %02x\n", |
3110 | "busn_res: %pR end %s updated to %02x\n", | ||
3111 | &old_res, ret ? "can not be" : "is", bus_max); | 3109 | &old_res, ret ? "can not be" : "is", bus_max); |
3112 | 3110 | ||
3113 | if (!ret && !res->parent) | 3111 | if (!ret && !res->parent) |
@@ -3125,8 +3123,7 @@ void pci_bus_release_busn_res(struct pci_bus *b) | |||
3125 | return; | 3123 | return; |
3126 | 3124 | ||
3127 | ret = release_resource(res); | 3125 | ret = release_resource(res); |
3128 | dev_printk(KERN_DEBUG, &b->dev, | 3126 | dev_info(&b->dev, "busn_res: %pR %s released\n", |
3129 | "busn_res: %pR %s released\n", | ||
3130 | res, ret ? "can not be" : "is"); | 3127 | res, ret ? "can not be" : "is"); |
3131 | } | 3128 | } |
3132 | 3129 | ||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8d1135ca330f..3f5a763addd3 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -159,8 +159,7 @@ static int __init pci_apply_final_quirks(void) | |||
159 | u8 tmp; | 159 | u8 tmp; |
160 | 160 | ||
161 | if (pci_cache_line_size) | 161 | if (pci_cache_line_size) |
162 | printk(KERN_DEBUG "PCI: CLS %u bytes\n", | 162 | pr_info("PCI: CLS %u bytes\n", pci_cache_line_size << 2); |
163 | pci_cache_line_size << 2); | ||
164 | 163 | ||
165 | pci_apply_fixup_final_quirks = true; | 164 | pci_apply_fixup_final_quirks = true; |
166 | for_each_pci_dev(dev) { | 165 | for_each_pci_dev(dev) { |
@@ -177,16 +176,16 @@ static int __init pci_apply_final_quirks(void) | |||
177 | if (!tmp || cls == tmp) | 176 | if (!tmp || cls == tmp) |
178 | continue; | 177 | continue; |
179 | 178 | ||
180 | pci_printk(KERN_DEBUG, dev, "CLS mismatch (%u != %u), using %u bytes\n", | 179 | pci_info(dev, "CLS mismatch (%u != %u), using %u bytes\n", |
181 | cls << 2, tmp << 2, | 180 | cls << 2, tmp << 2, |
182 | pci_dfl_cache_line_size << 2); | 181 | pci_dfl_cache_line_size << 2); |
183 | pci_cache_line_size = pci_dfl_cache_line_size; | 182 | pci_cache_line_size = pci_dfl_cache_line_size; |
184 | } | 183 | } |
185 | } | 184 | } |
186 | 185 | ||
187 | if (!pci_cache_line_size) { | 186 | if (!pci_cache_line_size) { |
188 | printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n", | 187 | pr_info("PCI: CLS %u bytes, default %u\n", cls << 2, |
189 | cls << 2, pci_dfl_cache_line_size << 2); | 188 | pci_dfl_cache_line_size << 2); |
190 | pci_cache_line_size = cls ? cls : pci_dfl_cache_line_size; | 189 | pci_cache_line_size = cls ? cls : pci_dfl_cache_line_size; |
191 | } | 190 | } |
192 | 191 | ||
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index ec44a0f3a7ac..c73e66725d05 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -255,10 +255,9 @@ static void reassign_resources_sorted(struct list_head *realloc_head, | |||
255 | (IORESOURCE_STARTALIGN|IORESOURCE_SIZEALIGN); | 255 | (IORESOURCE_STARTALIGN|IORESOURCE_SIZEALIGN); |
256 | if (pci_reassign_resource(add_res->dev, idx, | 256 | if (pci_reassign_resource(add_res->dev, idx, |
257 | add_size, align)) | 257 | add_size, align)) |
258 | pci_printk(KERN_DEBUG, add_res->dev, | 258 | pci_info(add_res->dev, "failed to add %llx res[%d]=%pR\n", |
259 | "failed to add %llx res[%d]=%pR\n", | 259 | (unsigned long long) add_size, idx, |
260 | (unsigned long long)add_size, | 260 | res); |
261 | idx, res); | ||
262 | } | 261 | } |
263 | out: | 262 | out: |
264 | list_del(&add_res->list); | 263 | list_del(&add_res->list); |
@@ -918,9 +917,9 @@ static void pbus_size_io(struct pci_bus *bus, resource_size_t min_size, | |||
918 | if (size1 > size0 && realloc_head) { | 917 | if (size1 > size0 && realloc_head) { |
919 | add_to_list(realloc_head, bus->self, b_res, size1-size0, | 918 | add_to_list(realloc_head, bus->self, b_res, size1-size0, |
920 | min_align); | 919 | min_align); |
921 | pci_printk(KERN_DEBUG, bus->self, "bridge window %pR to %pR add_size %llx\n", | 920 | pci_info(bus->self, "bridge window %pR to %pR add_size %llx\n", |
922 | b_res, &bus->busn_res, | 921 | b_res, &bus->busn_res, |
923 | (unsigned long long)size1-size0); | 922 | (unsigned long long) size1 - size0); |
924 | } | 923 | } |
925 | } | 924 | } |
926 | 925 | ||
@@ -1063,7 +1062,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, | |||
1063 | b_res->flags |= IORESOURCE_STARTALIGN; | 1062 | b_res->flags |= IORESOURCE_STARTALIGN; |
1064 | if (size1 > size0 && realloc_head) { | 1063 | if (size1 > size0 && realloc_head) { |
1065 | add_to_list(realloc_head, bus->self, b_res, size1-size0, add_align); | 1064 | add_to_list(realloc_head, bus->self, b_res, size1-size0, add_align); |
1066 | pci_printk(KERN_DEBUG, bus->self, "bridge window %pR to %pR add_size %llx add_align %llx\n", | 1065 | pci_info(bus->self, "bridge window %pR to %pR add_size %llx add_align %llx\n", |
1067 | b_res, &bus->busn_res, | 1066 | b_res, &bus->busn_res, |
1068 | (unsigned long long) (size1 - size0), | 1067 | (unsigned long long) (size1 - size0), |
1069 | (unsigned long long) add_align); | 1068 | (unsigned long long) add_align); |
@@ -1531,8 +1530,8 @@ static void pci_bridge_release_resources(struct pci_bus *bus, | |||
1531 | release_child_resources(r); | 1530 | release_child_resources(r); |
1532 | if (!release_resource(r)) { | 1531 | if (!release_resource(r)) { |
1533 | type = old_flags = r->flags & PCI_RES_TYPE_MASK; | 1532 | type = old_flags = r->flags & PCI_RES_TYPE_MASK; |
1534 | pci_printk(KERN_DEBUG, dev, "resource %d %pR released\n", | 1533 | pci_info(dev, "resource %d %pR released\n", |
1535 | PCI_BRIDGE_RESOURCES + idx, r); | 1534 | PCI_BRIDGE_RESOURCES + idx, r); |
1536 | /* keep the old size */ | 1535 | /* keep the old size */ |
1537 | r->end = resource_size(r) - 1; | 1536 | r->end = resource_size(r) - 1; |
1538 | r->start = 0; | 1537 | r->start = 0; |
@@ -1596,7 +1595,7 @@ static void pci_bus_dump_res(struct pci_bus *bus) | |||
1596 | if (!res || !res->end || !res->flags) | 1595 | if (!res || !res->end || !res->flags) |
1597 | continue; | 1596 | continue; |
1598 | 1597 | ||
1599 | dev_printk(KERN_DEBUG, &bus->dev, "resource %d %pR\n", i, res); | 1598 | dev_info(&bus->dev, "resource %d %pR\n", i, res); |
1600 | } | 1599 | } |
1601 | } | 1600 | } |
1602 | 1601 | ||
@@ -1730,9 +1729,8 @@ void pci_assign_unassigned_root_bus_resources(struct pci_bus *bus) | |||
1730 | int max_depth = pci_bus_get_depth(bus); | 1729 | int max_depth = pci_bus_get_depth(bus); |
1731 | 1730 | ||
1732 | pci_try_num = max_depth + 1; | 1731 | pci_try_num = max_depth + 1; |
1733 | dev_printk(KERN_DEBUG, &bus->dev, | 1732 | dev_info(&bus->dev, "max bus depth: %d pci_try_num: %d\n", |
1734 | "max bus depth: %d pci_try_num: %d\n", | 1733 | max_depth, pci_try_num); |
1735 | max_depth, pci_try_num); | ||
1736 | } | 1734 | } |
1737 | 1735 | ||
1738 | again: | 1736 | again: |
@@ -1766,8 +1764,8 @@ again: | |||
1766 | goto dump; | 1764 | goto dump; |
1767 | } | 1765 | } |
1768 | 1766 | ||
1769 | dev_printk(KERN_DEBUG, &bus->dev, | 1767 | dev_info(&bus->dev, "No. %d try to assign unassigned res\n", |
1770 | "No. %d try to assign unassigned res\n", tried_times + 1); | 1768 | tried_times + 1); |
1771 | 1769 | ||
1772 | /* third times and later will not check if it is leaf */ | 1770 | /* third times and later will not check if it is leaf */ |
1773 | if ((tried_times + 1) > 2) | 1771 | if ((tried_times + 1) > 2) |
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index eba6e33147a2..fbd8d9f54d6a 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -291,8 +291,7 @@ static int pci_frontend_enable_msix(struct pci_dev *dev, | |||
291 | vector[i] = op.msix_entries[i].vector; | 291 | vector[i] = op.msix_entries[i].vector; |
292 | } | 292 | } |
293 | } else { | 293 | } else { |
294 | printk(KERN_DEBUG "enable msix get value %x\n", | 294 | pr_info("enable msix get value %x\n", op.value); |
295 | op.value); | ||
296 | err = op.value; | 295 | err = op.value; |
297 | } | 296 | } |
298 | } else { | 297 | } else { |
@@ -364,12 +363,12 @@ static void pci_frontend_disable_msi(struct pci_dev *dev) | |||
364 | err = do_pci_op(pdev, &op); | 363 | err = do_pci_op(pdev, &op); |
365 | if (err == XEN_PCI_ERR_dev_not_found) { | 364 | if (err == XEN_PCI_ERR_dev_not_found) { |
366 | /* XXX No response from backend, what shall we do? */ | 365 | /* XXX No response from backend, what shall we do? */ |
367 | printk(KERN_DEBUG "get no response from backend for disable MSI\n"); | 366 | pr_info("get no response from backend for disable MSI\n"); |
368 | return; | 367 | return; |
369 | } | 368 | } |
370 | if (err) | 369 | if (err) |
371 | /* how can pciback notify us fail? */ | 370 | /* how can pciback notify us fail? */ |
372 | printk(KERN_DEBUG "get fake response frombackend\n"); | 371 | pr_info("get fake response from backend\n"); |
373 | } | 372 | } |
374 | 373 | ||
375 | static struct xen_pci_frontend_ops pci_frontend_ops = { | 374 | static struct xen_pci_frontend_ops pci_frontend_ops = { |