mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
drm/msm: Fix a couple of 64-bit build warnings
Avoid casts from pointers to fixed-size integers to prevent the compiler from warning. Print virtual memory addresses using %p instead. Also turn a couple of %d/%x specifiers into %zu/%zd/%zx to avoid further warnings due to mismatched format strings. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
332545b301
commit
fc99f97af2
4 changed files with 10 additions and 10 deletions
|
@ -132,7 +132,7 @@ ssize_t edp_aux_transfer(struct drm_dp_aux *drm_aux, struct drm_dp_aux_msg *msg)
|
|||
/* msg sanity check */
|
||||
if ((native && (msg->size > AUX_CMD_NATIVE_MAX)) ||
|
||||
(msg->size > AUX_CMD_I2C_MAX)) {
|
||||
pr_err("%s: invalid msg: size(%d), request(%x)\n",
|
||||
pr_err("%s: invalid msg: size(%zu), request(%x)\n",
|
||||
__func__, msg->size, msg->request);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ ssize_t edp_aux_transfer(struct drm_dp_aux *drm_aux, struct drm_dp_aux_msg *msg)
|
|||
*/
|
||||
edp_write(aux->base + REG_EDP_AUX_TRANS_CTRL, 0);
|
||||
msm_edp_aux_ctrl(aux, 1);
|
||||
pr_err("%s: aux timeout, %d\n", __func__, ret);
|
||||
pr_err("%s: aux timeout, %zd\n", __func__, ret);
|
||||
goto unlock_exit;
|
||||
}
|
||||
DBG("completion");
|
||||
|
|
|
@ -94,7 +94,7 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
|||
}
|
||||
|
||||
if (reglog)
|
||||
printk(KERN_DEBUG "IO:region %s %08x %08lx\n", dbgname, (u32)ptr, size);
|
||||
printk(KERN_DEBUG "IO:region %s %p %08lx\n", dbgname, ptr, size);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void __iomem *msm_ioremap(struct platform_device *pdev, const char *name,
|
|||
void msm_writel(u32 data, void __iomem *addr)
|
||||
{
|
||||
if (reglog)
|
||||
printk(KERN_DEBUG "IO:W %08x %08x\n", (u32)addr, data);
|
||||
printk(KERN_DEBUG "IO:W %p %08x\n", addr, data);
|
||||
writel(data, addr);
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ u32 msm_readl(const void __iomem *addr)
|
|||
{
|
||||
u32 val = readl(addr);
|
||||
if (reglog)
|
||||
printk(KERN_ERR "IO:R %08x %08x\n", (u32)addr, val);
|
||||
printk(KERN_ERR "IO:R %p %08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ static int get_mdp_ver(struct platform_device *pdev)
|
|||
const struct of_device_id *match;
|
||||
match = of_match_node(match_types, dev->of_node);
|
||||
if (match)
|
||||
return (int)match->data;
|
||||
return (int)(unsigned long)match->data;
|
||||
#endif
|
||||
return 4;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ static int msm_init_vram(struct drm_device *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
size = r.end - r.start;
|
||||
DRM_INFO("using VRAM carveout: %lx@%08x\n", size, r.start);
|
||||
DRM_INFO("using VRAM carveout: %lx@%pa\n", size, &r.start);
|
||||
} else
|
||||
#endif
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m)
|
|||
uint64_t off = drm_vma_node_start(&obj->vma_node);
|
||||
|
||||
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
|
||||
seq_printf(m, "%08x: %c(r=%u,w=%u) %2d (%2d) %08llx %p %d\n",
|
||||
seq_printf(m, "%08x: %c(r=%u,w=%u) %2d (%2d) %08llx %p %zu\n",
|
||||
msm_obj->flags, is_active(msm_obj) ? 'A' : 'I',
|
||||
msm_obj->read_fence, msm_obj->write_fence,
|
||||
obj->name, obj->refcount.refcount.counter,
|
||||
|
|
|
@ -60,7 +60,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint32_t iova,
|
|||
u32 pa = sg_phys(sg) - sg->offset;
|
||||
size_t bytes = sg->length + sg->offset;
|
||||
|
||||
VERB("map[%d]: %08x %08x(%x)", i, iova, pa, bytes);
|
||||
VERB("map[%d]: %08x %08x(%zx)", i, iova, pa, bytes);
|
||||
|
||||
ret = iommu_map(domain, da, pa, bytes, prot);
|
||||
if (ret)
|
||||
|
@ -99,7 +99,7 @@ static int msm_iommu_unmap(struct msm_mmu *mmu, uint32_t iova,
|
|||
if (unmapped < bytes)
|
||||
return unmapped;
|
||||
|
||||
VERB("unmap[%d]: %08x(%x)", i, iova, bytes);
|
||||
VERB("unmap[%d]: %08x(%zx)", i, iova, bytes);
|
||||
|
||||
BUG_ON(!PAGE_ALIGNED(bytes));
|
||||
|
||||
|
|
Loading…
Reference in a new issue