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 /drivers/xen/xen-pciback | |
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>
Diffstat (limited to 'drivers/xen/xen-pciback')
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 8 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/xenbus.c | 5 |
2 files changed, 7 insertions, 6 deletions
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 | } |