[PATCH] drm: Remove unused drm_device from drm_gem_object_lookup()

Daniel Vetter daniel at ffwll.ch
Tue May 17 06:48:58 UTC 2016


On Mon, May 16, 2016 at 11:15:09PM +0100, Emil Velikov wrote:
> Hi Chris,
> 
> On 9 May 2016 at 11:04, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> > --- a/drivers/gpu/drm/drm_gem.c
> > +++ b/drivers/gpu/drm/drm_gem.c
> 
> > @@ -607,12 +606,8 @@ drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp,
> >
> >         /* Check if we currently have a reference on the object */
> >         obj = idr_find(&filp->object_idr, handle);
> > -       if (obj == NULL) {
> > -               spin_unlock(&filp->table_lock);
> > -               return NULL;
> > -       }
> > -
> > -       drm_gem_object_reference(obj);
> > +       if (obj)
> > +               drm_gem_object_reference(obj);
> >
> This hunk looks unrelated to the goal of the patch. Still a nice
> cleanup though. Worth splitting out ?

Imo too trivial too require it's own patch, so applied to drm-misc. But
with the kerneldoc updated - 0day should have caught this.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list