Skip to content

Commit

Permalink
Merge pull request torvalds#243 from M1cha/pull-warnings
Browse files Browse the repository at this point in the history
lkl: use PRIxPTR for uintptr_t print format
  • Loading branch information
tavip authored Sep 22, 2016
2 parents 8ec3db0 + 620f9f1 commit d936b0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/lkl/lib/virtio.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <string.h>
#include <stdio.h>
#include <stdbool.h>
#include <inttypes.h>
#include <lkl_host.h>
#include <lkl/linux/virtio_ring.h>
#include "iomem.h"
Expand Down Expand Up @@ -548,7 +549,7 @@ int virtio_dev_setup(struct virtio_dev *dev, int queues, int num_max)

if (!lkl_is_running()) {
avail = sizeof(lkl_virtio_devs) - (devs - lkl_virtio_devs);
num_bytes = snprintf(devs, avail, " virtio_mmio.device=%d@0x%lx:%d",
num_bytes = snprintf(devs, avail, " virtio_mmio.device=%d@0x%"PRIxPTR":%d",
mmio_size, (uintptr_t) dev->base, dev->irq);
if (num_bytes < 0 || num_bytes >= avail) {
lkl_put_irq(dev->irq, "virtio");
Expand Down

0 comments on commit d936b0d

Please sign in to comment.