From: Jesse Barnes Date: Wed, 25 Jun 2008 23:12:25 +0000 (-0700) Subject: PCI: correct resource number in debug output X-Git-Tag: v2.6.27-rc1~1046^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4ec7a00ed30429030112e5591cf3138645727c2;p=platform%2Fkernel%2Flinux-stable.git PCI: correct resource number in debug output If pci_request_region fails, make the warning include the resource number, not the resource number + 1. --- diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 8b755a7..8e8ecc1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1114,10 +1114,10 @@ int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name) err_out: dev_warn(&pdev->dev, "BAR %d: can't reserve %s region [%#llx-%#llx]\n", - bar + 1, /* PCI BAR # */ - pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", - (unsigned long long)pci_resource_start(pdev, bar), - (unsigned long long)pci_resource_end(pdev, bar)); + bar, + pci_resource_flags(pdev, bar) & IORESOURCE_IO ? "I/O" : "mem", + (unsigned long long)pci_resource_start(pdev, bar), + (unsigned long long)pci_resource_end(pdev, bar)); return -EBUSY; }