Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'dma-buf-for-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf

Pull dma-buf fixes from Sumit Semwal:
"Minor timeout & other fixes on reservation/fence"

* tag 'dma-buf-for-4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf:
reservation: Remove shadowing local variable 'ret'
dma-buf/fence: don't wait when specified timeout is zero
reservation: wait only with non-zero timeout specified (v3)

+6 -2
+3
drivers/dma-buf/fence.c
··· 159 159 if (WARN_ON(timeout < 0)) 160 160 return -EINVAL; 161 161 162 + if (timeout == 0) 163 + return fence_is_signaled(fence); 164 + 162 165 trace_fence_wait_start(fence); 163 166 ret = fence->ops->wait(fence, intr, timeout); 164 167 trace_fence_wait_end(fence);
+3 -2
drivers/dma-buf/reservation.c
··· 327 327 unsigned seq, shared_count, i = 0; 328 328 long ret = timeout; 329 329 330 + if (!timeout) 331 + return reservation_object_test_signaled_rcu(obj, wait_all); 332 + 330 333 retry: 331 334 fence = NULL; 332 335 shared_count = 0; ··· 405 402 int ret = 1; 406 403 407 404 if (!test_bit(FENCE_FLAG_SIGNALED_BIT, &lfence->flags)) { 408 - int ret; 409 - 410 405 fence = fence_get_rcu(lfence); 411 406 if (!fence) 412 407 return -1;