From: Dan Carpenter <dan.carpenter@oracle.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: "Terje Bergström" <tbergstrom@nvidia.com>,
"David Airlie" <airlied@linux.ie>,
"Stephen Warren" <swarren@wwwdotorg.org>,
dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch 2/2] drm/tegra: silence some sparse complaints
Date: Fri, 08 Nov 2013 10:08:03 +0000 [thread overview]
Message-ID: <20131108100803.GY27977@elgon.mountain> (raw)
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;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: "Terje Bergström" <tbergstrom@nvidia.com>,
"David Airlie" <airlied@linux.ie>,
"Stephen Warren" <swarren@wwwdotorg.org>,
dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch 2/2] drm/tegra: silence some sparse complaints
Date: Fri, 8 Nov 2013 13:08:03 +0300 [thread overview]
Message-ID: <20131108100803.GY27977@elgon.mountain> (raw)
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;
next reply other threads:[~2013-11-08 10:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 10:08 Dan Carpenter [this message]
2013-11-08 10:08 ` [patch 2/2] drm/tegra: silence some sparse complaints Dan Carpenter
2013-11-08 12:34 ` Thierry Reding
2013-11-08 12:34 ` Thierry Reding
[not found] ` <20131108123455.GA31551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-11-08 13:29 ` Dan Carpenter
2013-11-08 13:29 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131108100803.GY27977@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=tbergstrom@nvidia.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.