diff mbox

[2/4] drm: Add missing __user annotation to drm_syncobj_array_find()

Message ID 20170901165328.24459-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Sept. 1, 2017, 4:53 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

'user_handles' needs a __user annotation for fix the following sparse
warning:
drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:813:37:    expected void const [noderef] <asn:1>*from
drm_syncobj.c:813:37:    got void *user_handles
drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:875:38:    expected void *user_handles
drm_syncobj.c:875:38:    got void [noderef] <asn:1>*<noident>
drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:908:38:    expected void *user_handles
drm_syncobj.c:908:38:    got void [noderef] <asn:1>*<noident>
drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
drm_syncobj.c:941:38:    expected void *user_handles
drm_syncobj.c:941:38:    got void [noderef] <asn:1>*<noident>

Cc: Jason Ekstrand <jason@jlekstrand.net>
Fixes: 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_syncobj.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thierry Reding Sept. 1, 2017, 5:44 p.m. UTC | #1
On Fri, Sep 01, 2017 at 07:53:26PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 'user_handles' needs a __user annotation for fix the following sparse
> warning:
> drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
> drm_syncobj.c:813:37:    expected void const [noderef] <asn:1>*from
> drm_syncobj.c:813:37:    got void *user_handles
> drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
> drm_syncobj.c:875:38:    expected void *user_handles
> drm_syncobj.c:875:38:    got void [noderef] <asn:1>*<noident>
> drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
> drm_syncobj.c:908:38:    expected void *user_handles
> drm_syncobj.c:908:38:    got void [noderef] <asn:1>*<noident>
> drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
> drm_syncobj.c:941:38:    expected void *user_handles
> drm_syncobj.c:941:38:    got void [noderef] <asn:1>*<noident>
> 
> Cc: Jason Ekstrand <jason@jlekstrand.net>
> Fixes: 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_syncobj.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>
Ville Syrjälä Oct. 13, 2017, 1:08 p.m. UTC | #2
On Fri, Sep 01, 2017 at 07:44:46PM +0200, Thierry Reding wrote:
> On Fri, Sep 01, 2017 at 07:53:26PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > 'user_handles' needs a __user annotation for fix the following sparse
> > warning:
> > drm_syncobj.c:813:37: warning: incorrect type in argument 2 (different address spaces)
> > drm_syncobj.c:813:37:    expected void const [noderef] <asn:1>*from
> > drm_syncobj.c:813:37:    got void *user_handles
> > drm_syncobj.c:875:38: warning: incorrect type in argument 2 (different address spaces)
> > drm_syncobj.c:875:38:    expected void *user_handles
> > drm_syncobj.c:875:38:    got void [noderef] <asn:1>*<noident>
> > drm_syncobj.c:908:38: warning: incorrect type in argument 2 (different address spaces)
> > drm_syncobj.c:908:38:    expected void *user_handles
> > drm_syncobj.c:908:38:    got void [noderef] <asn:1>*<noident>
> > drm_syncobj.c:941:38: warning: incorrect type in argument 2 (different address spaces)
> > drm_syncobj.c:941:38:    expected void *user_handles
> > drm_syncobj.c:941:38:    got void [noderef] <asn:1>*<noident>
> > 
> > Cc: Jason Ekstrand <jason@jlekstrand.net>
> > Fixes: 3e6fb72d6cef ("drm/syncobj: Add a syncobj_array_find helper")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/drm_syncobj.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Thierry Reding <treding@nvidia.com>

Pushed the remainder of this series to drm-misc-next. Thanks for the review.
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 26d60615b4d4..fa03a1a51453 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -799,7 +799,7 @@  static int drm_syncobj_array_wait(struct drm_device *dev,
 }
 
 static int drm_syncobj_array_find(struct drm_file *file_private,
-				  void *user_handles, uint32_t count_handles,
+				  void __user *user_handles, uint32_t count_handles,
 				  struct drm_syncobj ***syncobjs_out)
 {
 	uint32_t i, *handles;