Commit e4de866a834620ef974f5ba86d394a13d2f0cf66

Authored by Konrad Rzeszutek Wilk
1 parent 207d543f47

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>

Showing 3 changed files with 12 additions and 11 deletions Side-by-side Diff

drivers/pci/xen-pcifront.c
... ... @@ -189,7 +189,7 @@
189 189  
190 190 if (verbose_request)
191 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 193 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn),
194 194 PCI_FUNC(devfn), where, size);
195 195  
... ... @@ -228,7 +228,7 @@
228 228  
229 229 if (verbose_request)
230 230 dev_info(&pdev->xdev->dev,
231   - "write dev=%04x:%02x:%02x.%01x - "
  231 + "write dev=%04x:%02x:%02x.%d - "
232 232 "offset %x size %d val %x\n",
233 233 pci_domain_nr(bus), bus->number,
234 234 PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val);
... ... @@ -432,7 +432,7 @@
432 432 d = pci_scan_single_device(b, devfn);
433 433 if (d)
434 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 436 PCI_SLOT(devfn), PCI_FUNC(devfn));
437 437 }
438 438  
... ... @@ -1041,7 +1041,7 @@
1041 1041 pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func));
1042 1042 if (!pci_dev) {
1043 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 1045 domain, bus, slot, func);
1046 1046 continue;
1047 1047 }
... ... @@ -1049,7 +1049,7 @@
1049 1049 pci_dev_put(pci_dev);
1050 1050  
1051 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 1053 domain, bus, slot, func);
1054 1054 }
1055 1055  
drivers/xen/xen-pciback/pci_stub.c
... ... @@ -884,7 +884,7 @@
884 884 int err;
885 885  
886 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 888 func, reg, size, mask);
889 889 if (err == 7)
890 890 return 0;
... ... @@ -904,7 +904,7 @@
904 904 pci_dev_id->bus = bus;
905 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 908 domain, bus, slot, func);
909 909  
910 910 spin_lock_irqsave(&device_ids_lock, flags);
... ... @@ -934,7 +934,7 @@
934 934  
935 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 938 "seize list\n", domain, bus, slot, func);
939 939 }
940 940 }
... ... @@ -1029,7 +1029,7 @@
1029 1029 break;
1030 1030  
1031 1031 count += scnprintf(buf + count, PAGE_SIZE - count,
1032   - "%04x:%02x:%02x.%01x\n",
  1032 + "%04x:%02x:%02x.%d\n",
1033 1033 pci_dev_id->domain, pci_dev_id->bus,
1034 1034 PCI_SLOT(pci_dev_id->devfn),
1035 1035 PCI_FUNC(pci_dev_id->devfn));
drivers/xen/xen-pciback/xenbus.c
... ... @@ -206,6 +206,7 @@
206 206 goto out;
207 207 }
208 208  
  209 + /* Note: The PV protocol uses %02x, don't change it */
209 210 err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str,
210 211 "%04x:%02x:%02x.%02x", domain, bus,
211 212 PCI_SLOT(devfn), PCI_FUNC(devfn));
... ... @@ -229,7 +230,7 @@
229 230 err = -EINVAL;
230 231 xenbus_dev_fatal(pdev->xdev, err,
231 232 "Couldn't locate PCI device "
232   - "(%04x:%02x:%02x.%01x)! "
  233 + "(%04x:%02x:%02x.%d)! "
233 234 "perhaps already in-use?",
234 235 domain, bus, slot, func);
235 236 goto out;
... ... @@ -274,7 +275,7 @@
274 275 if (!dev) {
275 276 err = -EINVAL;
276 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 279 domain, bus, slot, func);
279 280 goto out;
280 281 }