On Thu, 2025-11-13 at 15:51 +0100, Christian König wrote: > Using the inline lock is now the recommended way for dma_fence > implementations. > > So use this approach for the framework internal fences as well. > > Also saves about 4 bytes for the external spinlock. > > Signed-off-by: Christian König <[email protected]> > Reviewed-by: Tvrtko Ursulin <[email protected]>
Reviewed-by: Philipp Stanner <[email protected]> > --- > drivers/dma-buf/dma-fence-chain.c | 3 +-- > include/linux/dma-fence-chain.h | 1 - > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/dma-buf/dma-fence-chain.c > b/drivers/dma-buf/dma-fence-chain.c > index a8a90acf4f34..a707792b6025 100644 > --- a/drivers/dma-buf/dma-fence-chain.c > +++ b/drivers/dma-buf/dma-fence-chain.c > @@ -245,7 +245,6 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, > struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev); > uint64_t context; > > - spin_lock_init(&chain->lock); > rcu_assign_pointer(chain->prev, prev); > chain->fence = fence; > chain->prev_seqno = 0; > @@ -261,7 +260,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain, > seqno = max(prev->seqno, seqno); > } > > - dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock, > + dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL, > context, seqno); > > /* > diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h > index 68c3c1e41014..d39ce7a2e599 100644 > --- a/include/linux/dma-fence-chain.h > +++ b/include/linux/dma-fence-chain.h > @@ -46,7 +46,6 @@ struct dma_fence_chain { > */ > struct irq_work work; > }; > - spinlock_t lock; > }; > >
