diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-01-25 16:00:00 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-02-03 16:06:57 -0500 |
commit | e4de866a834620ef974f5ba86d394a13d2f0cf66 (patch) | |
tree | f34c543230140270b05639b842fbaead72560972 | |
parent | 207d543f472c1ac9552df79838dc807cbcaa9740 (diff) |
xen/pci[front|back]: Use %d instead of %1x for displaying PCI devfn.
.. as the rest of the kernel is using that format.
Suggested-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | drivers/pci/xen-pcifront.c | 10 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 8 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/xenbus.c | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7cf3d2fcf56a..1620088a0e7e 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -189,7 +189,7 @@ static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, | |||
189 | 189 | ||
190 | if (verbose_request) | 190 | if (verbose_request) |
191 | dev_info(&pdev->xdev->dev, | 191 | dev_info(&pdev->xdev->dev, |
192 | "read dev=%04x:%02x:%02x.%01x - offset %x size %d\n", | 192 | "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", |
193 | pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), | 193 | pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), |
194 | PCI_FUNC(devfn), where, size); | 194 | PCI_FUNC(devfn), where, size); |
195 | 195 | ||
@@ -228,7 +228,7 @@ static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, | |||
228 | 228 | ||
229 | if (verbose_request) | 229 | if (verbose_request) |
230 | dev_info(&pdev->xdev->dev, | 230 | dev_info(&pdev->xdev->dev, |
231 | "write dev=%04x:%02x:%02x.%01x - " | 231 | "write dev=%04x:%02x:%02x.%d - " |
232 | "offset %x size %d val %x\n", | 232 | "offset %x size %d val %x\n", |
233 | pci_domain_nr(bus), bus->number, | 233 | pci_domain_nr(bus), bus->number, |
234 | PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); | 234 | PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); |
@@ -432,7 +432,7 @@ static int __devinit pcifront_scan_bus(struct pcifront_device *pdev, | |||
432 | d = pci_scan_single_device(b, devfn); | 432 | d = pci_scan_single_device(b, devfn); |
433 | if (d) | 433 | if (d) |
434 | dev_info(&pdev->xdev->dev, "New device on " | 434 | dev_info(&pdev->xdev->dev, "New device on " |
435 | "%04x:%02x:%02x.%02x found.\n", domain, bus, | 435 | "%04x:%02x:%02x.%d found.\n", domain, bus, |
436 | PCI_SLOT(devfn), PCI_FUNC(devfn)); | 436 | PCI_SLOT(devfn), PCI_FUNC(devfn)); |
437 | } | 437 | } |
438 | 438 | ||
@@ -1041,7 +1041,7 @@ static int pcifront_detach_devices(struct pcifront_device *pdev) | |||
1041 | pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func)); | 1041 | pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func)); |
1042 | if (!pci_dev) { | 1042 | if (!pci_dev) { |
1043 | dev_dbg(&pdev->xdev->dev, | 1043 | dev_dbg(&pdev->xdev->dev, |
1044 | "Cannot get PCI device %04x:%02x:%02x.%02x\n", | 1044 | "Cannot get PCI device %04x:%02x:%02x.%d\n", |
1045 | domain, bus, slot, func); | 1045 | domain, bus, slot, func); |
1046 | continue; | 1046 | continue; |
1047 | } | 1047 | } |
@@ -1049,7 +1049,7 @@ static int pcifront_detach_devices(struct pcifront_device *pdev) | |||
1049 | pci_dev_put(pci_dev); | 1049 | pci_dev_put(pci_dev); |
1050 | 1050 | ||
1051 | dev_dbg(&pdev->xdev->dev, | 1051 | dev_dbg(&pdev->xdev->dev, |
1052 | "PCI device %04x:%02x:%02x.%02x removed.\n", | 1052 | "PCI device %04x:%02x:%02x.%d removed.\n", |
1053 | domain, bus, slot, func); | 1053 | domain, bus, slot, func); |
1054 | } | 1054 | } |
1055 | 1055 | ||
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index 7944a17f5cbf..19834d1c7c36 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
@@ -884,7 +884,7 @@ static inline int str_to_quirk(const char *buf, int *domain, int *bus, int | |||
884 | int err; | 884 | int err; |
885 | 885 | ||
886 | err = | 886 | err = |
887 | sscanf(buf, " %04x:%02x:%02x.%1x-%08x:%1x:%08x", domain, bus, slot, | 887 | sscanf(buf, " %04x:%02x:%02x.%d-%08x:%1x:%08x", domain, bus, slot, |
888 | func, reg, size, mask); | 888 | func, reg, size, mask); |
889 | if (err == 7) | 889 | if (err == 7) |
890 | return 0; | 890 | return 0; |
@@ -904,7 +904,7 @@ static int pcistub_device_id_add(int domain, int bus, int slot, int func) | |||
904 | pci_dev_id->bus = bus; | 904 | pci_dev_id->bus = bus; |
905 | pci_dev_id->devfn = PCI_DEVFN(slot, func); | 905 | pci_dev_id->devfn = PCI_DEVFN(slot, func); |
906 | 906 | ||
907 | pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%01x\n", | 907 | pr_debug(DRV_NAME ": wants to seize %04x:%02x:%02x.%d\n", |
908 | domain, bus, slot, func); | 908 | domain, bus, slot, func); |
909 | 909 | ||
910 | spin_lock_irqsave(&device_ids_lock, flags); | 910 | spin_lock_irqsave(&device_ids_lock, flags); |
@@ -934,7 +934,7 @@ static int pcistub_device_id_remove(int domain, int bus, int slot, int func) | |||
934 | 934 | ||
935 | err = 0; | 935 | err = 0; |
936 | 936 | ||
937 | pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%01x from " | 937 | pr_debug(DRV_NAME ": removed %04x:%02x:%02x.%d from " |
938 | "seize list\n", domain, bus, slot, func); | 938 | "seize list\n", domain, bus, slot, func); |
939 | } | 939 | } |
940 | } | 940 | } |
@@ -1029,7 +1029,7 @@ static ssize_t pcistub_slot_show(struct device_driver *drv, char *buf) | |||
1029 | break; | 1029 | break; |
1030 | 1030 | ||
1031 | count += scnprintf(buf + count, PAGE_SIZE - count, | 1031 | count += scnprintf(buf + count, PAGE_SIZE - count, |
1032 | "%04x:%02x:%02x.%01x\n", | 1032 | "%04x:%02x:%02x.%d\n", |
1033 | pci_dev_id->domain, pci_dev_id->bus, | 1033 | pci_dev_id->domain, pci_dev_id->bus, |
1034 | PCI_SLOT(pci_dev_id->devfn), | 1034 | PCI_SLOT(pci_dev_id->devfn), |
1035 | PCI_FUNC(pci_dev_id->devfn)); | 1035 | PCI_FUNC(pci_dev_id->devfn)); |
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c index d5dcf8d5d3d9..64b11f99eacc 100644 --- a/drivers/xen/xen-pciback/xenbus.c +++ b/drivers/xen/xen-pciback/xenbus.c | |||
@@ -206,6 +206,7 @@ static int xen_pcibk_publish_pci_dev(struct xen_pcibk_device *pdev, | |||
206 | goto out; | 206 | goto out; |
207 | } | 207 | } |
208 | 208 | ||
209 | /* Note: The PV protocol uses %02x, don't change it */ | ||
209 | err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, | 210 | err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, |
210 | "%04x:%02x:%02x.%02x", domain, bus, | 211 | "%04x:%02x:%02x.%02x", domain, bus, |
211 | PCI_SLOT(devfn), PCI_FUNC(devfn)); | 212 | PCI_SLOT(devfn), PCI_FUNC(devfn)); |
@@ -229,7 +230,7 @@ static int xen_pcibk_export_device(struct xen_pcibk_device *pdev, | |||
229 | err = -EINVAL; | 230 | err = -EINVAL; |
230 | xenbus_dev_fatal(pdev->xdev, err, | 231 | xenbus_dev_fatal(pdev->xdev, err, |
231 | "Couldn't locate PCI device " | 232 | "Couldn't locate PCI device " |
232 | "(%04x:%02x:%02x.%01x)! " | 233 | "(%04x:%02x:%02x.%d)! " |
233 | "perhaps already in-use?", | 234 | "perhaps already in-use?", |
234 | domain, bus, slot, func); | 235 | domain, bus, slot, func); |
235 | goto out; | 236 | goto out; |
@@ -274,7 +275,7 @@ static int xen_pcibk_remove_device(struct xen_pcibk_device *pdev, | |||
274 | if (!dev) { | 275 | if (!dev) { |
275 | err = -EINVAL; | 276 | err = -EINVAL; |
276 | dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " | 277 | dev_dbg(&pdev->xdev->dev, "Couldn't locate PCI device " |
277 | "(%04x:%02x:%02x.%01x)! not owned by this domain\n", | 278 | "(%04x:%02x:%02x.%d)! not owned by this domain\n", |
278 | domain, bus, slot, func); | 279 | domain, bus, slot, func); |
279 | goto out; | 280 | goto out; |
280 | } | 281 | } |