public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] drm/tegra: silence some sparse complaints
@ 2013-11-08 10:08 Dan Carpenter
  2013-11-08 12:34 ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2013-11-08 10:08 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Terje Bergström, David Airlie, Stephen Warren, dri-devel,
	linux-tegra, kernel-janitors

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>*cmdbufs
drivers/gpu/drm/tegra/drm.c:138:18:    got void *[noderef] <asn:1><noident>

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index fd3ff3b..96a9207 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch 2/2] drm/tegra: silence some sparse complaints
  2013-11-08 10:08 [patch 2/2] drm/tegra: silence some sparse complaints Dan Carpenter
@ 2013-11-08 12:34 ` Thierry Reding
       [not found]   ` <20131108123455.GA31551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2013-11-08 12:34 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Terje Bergström, David Airlie, Stephen Warren, dri-devel,
	linux-tegra, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Fri, Nov 08, 2013 at 01:08:03PM +0300, Dan Carpenter wrote:
> 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>*cmdbufs
> drivers/gpu/drm/tegra/drm.c:138:18:    got void *[noderef] <asn:1><noident>
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 2/2] drm/tegra: silence some sparse complaints
       [not found]   ` <20131108123455.GA31551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
@ 2013-11-08 13:29     ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2013-11-08 13:29 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Terje Bergström, David Airlie, Stephen Warren,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

On Fri, Nov 08, 2013 at 01:34:56PM +0100, Thierry Reding wrote:
> On Fri, Nov 08, 2013 at 01:08:03PM +0300, Dan Carpenter wrote:
> > 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>*cmdbufs
> > drivers/gpu/drm/tegra/drm.c:138:18:    got void *[noderef] <asn:1><noident>
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-08 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 10:08 [patch 2/2] drm/tegra: silence some sparse complaints Dan Carpenter
2013-11-08 12:34 ` Thierry Reding
     [not found]   ` <20131108123455.GA31551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-11-08 13:29     ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox