]> Pileus Git - ~andy/linux/commitdiff
remoteproc: Fix use of format specifyer
authorEmil Goode <emilgoode@gmail.com>
Fri, 28 Sep 2012 15:35:06 +0000 (17:35 +0200)
committerOhad Ben-Cohen <ohad@wizery.com>
Tue, 2 Oct 2012 08:14:43 +0000 (10:14 +0200)
The dma_addr_t type can be either u32 or u64 depending on
the configuration. We should use a format specifyer for the
larger type and explicitly cast to it.

Sparse warnings:
drivers/remoteproc/remoteproc_core.c:234:2: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 6 has type ‘dma_addr_t’ [-Wformat]

drivers/remoteproc/remoteproc_core.c:596:2: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 5 has type ‘dma_addr_t’ [-Wformat]

drivers/remoteproc/remoteproc_core.c:634:3:
warning: format ‘%x’ expects argument of type ‘unsigned int’,
but argument 5 has type ‘dma_addr_t’ [-Wformat]

Signed-off-by: Emil Goode <emilgoode@gmail.com>
[fix commit log typos]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
drivers/remoteproc/remoteproc_core.c

index f163704b6ce5ead1e6873c6426e2af5f44b91003..dd3bfaf1ad4075436c8bce652d48d80024d5c705 100644 (file)
@@ -231,8 +231,8 @@ int rproc_alloc_vring(struct rproc_vdev *rvdev, int i)
        /* Store largest notifyid */
        rproc->max_notifyid = max(rproc->max_notifyid, notifyid);
 
-       dev_dbg(dev, "vring%d: va %p dma %x size %x idr %d\n", i, va,
-                                       dma, size, notifyid);
+       dev_dbg(dev, "vring%d: va %p dma %llx size %x idr %d\n", i, va,
+                               (unsigned long long)dma, size, notifyid);
 
        rvring->va = va;
        rvring->dma = dma;
@@ -586,7 +586,8 @@ static int rproc_handle_carveout(struct rproc *rproc,
                goto free_carv;
        }
 
-       dev_dbg(dev, "carveout va %p, dma %x, len 0x%x\n", va, dma, rsc->len);
+       dev_dbg(dev, "carveout va %p, dma %llx, len 0x%x\n", va,
+                                       (unsigned long long)dma, rsc->len);
 
        /*
         * Ok, this is non-standard.
@@ -631,7 +632,8 @@ static int rproc_handle_carveout(struct rproc *rproc,
                mapping->len = rsc->len;
                list_add_tail(&mapping->node, &rproc->mappings);
 
-               dev_dbg(dev, "carveout mapped 0x%x to 0x%x\n", rsc->da, dma);
+               dev_dbg(dev, "carveout mapped 0x%x to 0x%llx\n",
+                                       rsc->da, (unsigned long long)dma);
        }
 
        /*