Re: [PATCH] drm/drm_syncobj: Dead code removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 04, 2019 at 03:25:00PM +0300, Lionel Landwerlin wrote:
> On 04/10/2019 15:16, Zbigniew Kempczyński wrote:
> > Remove dead code, likely overseened during review process.
> > 
> > Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@xxxxxxxxx>
> > Cc: Chunming Zhou <david1.zhou@xxxxxxx>
> > Cc: Daniel Vetter <daniel@xxxxxxxx>
> > Cc: Jason Ekstrand <jason@xxxxxxxxxxxxxx>
> > ---
> >   drivers/gpu/drm/drm_syncobj.c | 4 ----
> >   1 file changed, 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> > index 4b5c7b0ed714..21a22e39c9fa 100644
> > --- a/drivers/gpu/drm/drm_syncobj.c
> > +++ b/drivers/gpu/drm/drm_syncobj.c
> > @@ -192,8 +192,6 @@ static void drm_syncobj_fence_add_wait(struct drm_syncobj *syncobj,
> >   	if (!fence || dma_fence_chain_find_seqno(&fence, wait->point)) {
> >   		dma_fence_put(fence);
> >   		list_add_tail(&wait->node, &syncobj->cb_list);
> > -	} else if (!fence) {
> > -		wait->fence = dma_fence_get_stub();
> >   	} else {
> >   		wait->fence = fence;
> >   	}
> > @@ -856,8 +854,6 @@ static void syncobj_wait_syncobj_func(struct drm_syncobj *syncobj,
> >   	if (!fence || dma_fence_chain_find_seqno(&fence, wait->point)) {
> >   		dma_fence_put(fence);
> >   		return;
> > -	} else if (!fence) {
> > -		wait->fence = dma_fence_get_stub();
> >   	} else {
> >   		wait->fence = fence;
> >   	}
> 
> Like Chris said, dma_fence_chain_find_seqno() will update the fence pointer,
> so a subsequent check might not be dealing with the same value.
> 
> A bit cheeky, but...

Feels like warrants a comment, I missed this one too. Maybe even extract
it into one common function since it's the same code in both places?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux