Преглед изворни кода

[virtio] Fix virtio-pci logging

iPXE debug logging doesn't support %u.  This commit replaces it with
%d in virtio-pci debug format strings.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Ladi Prosek пре 8 година
родитељ
комит
040aa980d6
1 измењених фајлова са 7 додато и 7 уклоњено
  1. 7
    7
      src/drivers/bus/virtio-pci.c

+ 7
- 7
src/drivers/bus/virtio-pci.c Прегледај датотеку

@@ -253,21 +253,21 @@ int virtio_pci_map_capability(struct pci_device *pci, int cap, size_t minlen,
253 253
                           &length);
254 254
 
255 255
     if (length <= start) {
256
-        DBG("VIRTIO-PCI bad capability len %u (>%u expected)\n", length, start);
256
+        DBG("VIRTIO-PCI bad capability len %d (>%d expected)\n", length, start);
257 257
         return -EINVAL;
258 258
     }
259 259
     if (length - start < minlen) {
260
-        DBG("VIRTIO-PCI bad capability len %u (>=%zu expected)\n", length, minlen);
260
+        DBG("VIRTIO-PCI bad capability len %d (>=%zd expected)\n", length, minlen);
261 261
         return -EINVAL;
262 262
     }
263 263
     length -= start;
264 264
     if (start + offset < offset) {
265
-        DBG("VIRTIO-PCI map wrap-around %u+%u\n", start, offset);
265
+        DBG("VIRTIO-PCI map wrap-around %d+%d\n", start, offset);
266 266
         return -EINVAL;
267 267
     }
268 268
     offset += start;
269 269
     if (offset & (align - 1)) {
270
-        DBG("VIRTIO-PCI offset %u not aligned to %u\n", offset, align);
270
+        DBG("VIRTIO-PCI offset %d not aligned to %d\n", offset, align);
271 271
         return -EINVAL;
272 272
     }
273 273
     if (length > size) {
@@ -276,9 +276,9 @@ int virtio_pci_map_capability(struct pci_device *pci, int cap, size_t minlen,
276 276
 
277 277
     if (minlen + offset < minlen ||
278 278
         minlen + offset > pci_bar_size(pci, PCI_BASE_ADDRESS(bar))) {
279
-        DBG("VIRTIO-PCI map virtio %zu@%u out of range on bar %i length %lu\n",
279
+        DBG("VIRTIO-PCI map virtio %zd@%d out of range on bar %i length %ld\n",
280 280
             minlen, offset,
281
-            bar, (unsigned long)pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
281
+            bar, pci_bar_size(pci, PCI_BASE_ADDRESS(bar)));
282 282
         return -EINVAL;
283 283
     }
284 284
 
@@ -354,7 +354,7 @@ int vpm_find_vqs(struct virtio_pci_modern_device *vdev,
354 354
             return -ENOENT;
355 355
 
356 356
         if (size & (size - 1)) {
357
-            DBG("VIRTIO-PCI %p: bad queue size %u", vdev, size);
357
+            DBG("VIRTIO-PCI %p: bad queue size %d", vdev, size);
358 358
             return -EINVAL;
359 359
         }
360 360
 

Loading…
Откажи
Сачувај