video: tegra: nvmap: fix compiler warnings
Jon Mayo [Fri, 8 Nov 2013 20:37:24 +0000 (12:37 -0800)]
Fix phys_addr_t/dma_addr_t related warnings by using new %pa printk format.

Change-Id: I52f6bfb9a97c30a172ad0bb26fb50bc9e1e01e1c
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/328431
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>

drivers/video/tegra/nvmap/nvmap_dev.c
drivers/video/tegra/nvmap/nvmap_dmabuf.c
drivers/video/tegra/nvmap/nvmap_heap.c

index a8d3b7c..a730e21 100644 (file)
@@ -1359,8 +1359,8 @@ static int nvmap_probe(struct platform_device *pdev)
                if (!co->size)
                        continue;
 
-               dev_info(&pdev->dev, "heap (%s) base (0x%x) size (%d)\n",
-                       co->name, node->base, node->size);
+               dev_info(&pdev->dev, "heap (%s) base (%pa) size (%d)\n",
+                       co->name, &node->base, node->size);
 
                node->carveout = nvmap_heap_create(dev->dev_user.this_device,
                                   co->name, node->base, node->size, node);
@@ -1390,7 +1390,7 @@ static int nvmap_probe(struct platform_device *pdev)
                                debugfs_create_file("allocations", S_IRUGO,
                                    heap_root, node, &debug_allocations_fops);
                                debugfs_create_x32("base", S_IRUGO,
-                                   heap_root, &node->base);
+                                   heap_root, (u32 *)&node->base);
                                debugfs_create_x32("size", S_IRUGO,
                                    heap_root, &node->size);
                        }
index a9b4789..1c762c3 100644 (file)
@@ -741,6 +741,7 @@ static int __nvmap_dmabuf_stashes_show(struct seq_file *s, void *data)
        struct nvmap_handle *handle;
        struct nvmap_client *client;
        const char *name;
+       phys_addr_t addr;
 
        mutex_lock(&nvmap_stashed_maps_lock);
        list_for_each_entry(nvmap_sgt, &nvmap_stashed_maps, stash_entry) {
@@ -761,8 +762,9 @@ static int __nvmap_dmabuf_stashes_show(struct seq_file *s, void *data)
 
                seq_printf(s, "  device = %s\n",
                           dev_name(handle->attachment->dev));
-               seq_printf(s, "  IO addr = 0x%08x + 0x%x\n",
-                          sg_dma_address(nvmap_sgt->sgt->sgl), handle->size);
+               addr = sg_dma_address(nvmap_sgt->sgt->sgl);
+               seq_printf(s, "  IO addr = 0x%pa + 0x%x\n",
+                       &addr, handle->size);
 
                /* Cleanup. */
                nvmap_client_put(client);
index 4c25834..0946823 100644 (file)
@@ -235,8 +235,8 @@ static struct nvmap_heap_block *do_heap_alloc(struct nvmap_heap *heap,
                        __func__, dev_name(&heap->dev));
                goto fail_dma_alloc;
        }
-       pr_debug("dma_alloc_coherent base (0x%x) size (%d) heap (%s)\n",
-               dev_base, len, heap->name);
+       pr_debug("dma_alloc_coherent base (%pa) size (%d) heap (%s)\n",
+               &dev_base, len, heap->name);
 
        heap_block->block.base = dev_base;
        heap_block->orig_addr = dev_base;