Add more information, the name of the resource will be printed when the request memory region or remapping of configuration space fails in the devm_request_mem_region() function. Signed-off-by: Dejin Zheng <zhengdejin5@xxxxxxxxx> --- drivers/pci/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index ce096272f52b..81c1045a3fa8 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4153,13 +4153,15 @@ void __iomem *devm_pci_remap_cfg_resource(struct device *dev, name = res->name ?: dev_name(dev); if (!devm_request_mem_region(dev, res->start, size, name)) { - dev_err(dev, "can't request region for resource %pR\n", res); + dev_err(dev, "can't request region for %s's resource %pR\n", + name, res); return IOMEM_ERR_PTR(-EBUSY); } dest_ptr = devm_pci_remap_cfgspace(dev, res->start, size); if (!dest_ptr) { - dev_err(dev, "ioremap failed for resource %pR\n", res); + dev_err(dev, "ioremap failed for %s's resource %pR\n", + name, res); devm_release_mem_region(dev, res->start, size); dest_ptr = IOMEM_ERR_PTR(-ENOMEM); } -- 2.25.0