drm/tegra: silence some sparse complaints
PATCH 2/2 drm/tegra: silence some sparse complaints
I've shifted the __user markup to make Sparse happy.
drivers/gpu/drm/tegra/drm.c:138:18: warning: incorrect type in initializer (different address spaces)drivers/gpu/drm/tegra/drm.c:138:18: expected struct drm_tegra_cmdbuf [noderef] <asn:1>*cmdbufsdrivers/gpu/drm/tegra/drm.c:138:18: got void *[noderef] <asn:1><noident>
drivers/gpu/drm/tegra/drm.c +4 -4
@@ -135,11 +135,11 @@ int tegra_drm_submit(struct tegra_drm_context *context,unsigned int num_relocs = args->num_relocs;unsigned int num_waitchks = args->num_waitchks;struct drm_tegra_cmdbuf __user *cmdbufs = - (void *__user )(uintptr_t )args->cmdbufs; + (void __user *)(uintptr_t )args->cmdbufs;struct drm_tegra_reloc __user *relocs = - (void *__user )(uintptr_t )args->relocs; + (void __user *)(uintptr_t )args->relocs;struct drm_tegra_waitchk __user *waitchks = - (void *__user )(uintptr_t )args->waitchks; + (void __user *)(uintptr_t )args->waitchks;struct drm_tegra_syncpt syncpt;struct host1x_job *job;int err;
@@ -207,7 +207,7 @@ int tegra_drm_submit(struct tegra_drm_context *context, goto fail; } -if (copy_from_user (&syncpt, (void *__user )(uintptr_t )args->syncpts, +if (copy_from_user (&syncpt, (void __user *)(uintptr_t )args->syncpts,sizeof (syncpt))) { err = -EFAULT ; goto fail;
Quoted 7 lines · Dan Carpenter
I've shifted the
__usermarkup to make Sparse happy.
drivers/gpu/drm/tegra/drm.c:138:18: warning: incorrect type in initializer (different address spaces)drivers/gpu/drm/tegra/drm.c:138:18: expected structdrm_tegra_cmdbuf[noderef] <asn:1>*cmdbufsdrivers/gpu/drm/tegra/drm.c:138:18: got void *[noderef] <asn:1><noident>Signed-off-by Dan Carpenter <[email protected]>
Hi Dan,
I fixed exactly the same sparse warnings (along with many others this morning). We really ought to have a tag to put into a commit to credit people who've come up with the same patch at the same time.
Thierry
A message that is not in the archive (sent off-list or not yet received): 20131108123455.GA31551-AwZRO8vwLAwmlAP/[email protected]
Quoted 7 lines · Thierry Reding
Quoted 6 lines · Dan Carpenter
I've shifted the
__usermarkup to make Sparse happy.
drivers/gpu/drm/tegra/drm.c:138:18: warning: incorrect type in initializer (different address spaces)drivers/gpu/drm/tegra/drm.c:138:18: expected structdrm_tegra_cmdbuf[noderef] <asn:1>*cmdbufsdrivers/gpu/drm/tegra/drm.c:138:18: got void *[noderef] <asn:1><noident>
Quoted 7 lines
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>Hi Dan,
I fixed exactly the same sparse warnings (along with many others this morning). We really ought to have a tag to put into a commit to credit people who've come up with the same patch at the same time.
No no. First come first serve. :)
regards,
dan carpenter