Chris Wilson <[email protected]> writes: > Now that atomic64_fetch_add() exists we can use it to return the base > context id, rather than the atomic64_add_return(N) - N concoction. > > Suggested-by: Mika Kuoppala <[email protected]> > Signed-off-by: Chris Wilson <[email protected]> > Cc: Mika Kuoppala <[email protected]> > --- > drivers/dma-buf/dma-fence.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c > index 052a41e2451c..90edf2b281b0 100644 > --- a/drivers/dma-buf/dma-fence.c > +++ b/drivers/dma-buf/dma-fence.c > @@ -106,7 +106,7 @@ EXPORT_SYMBOL(dma_fence_get_stub); > u64 dma_fence_context_alloc(unsigned num) > { > WARN_ON(!num); > - return atomic64_add_return(num, &dma_fence_context_counter) - num; > + return atomic64_fetch_add(num, &dma_fence_context_counter); > } > EXPORT_SYMBOL(dma_fence_context_alloc); >
Looks good. Reviewed-by: Maciej Patelczyk <[email protected]> -MaciejP. _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
