/* ioat2_cleanup - clean finished descriptors (advance tail pointer) @chan: ioat channel to be cleaned up  */
static void ioat2_cleanup(struct ioat2_dma_chan *ioat)
/* ioat2_cleanup - clean finished descriptors (advance tail pointer) @chan: ioat channel to be cleaned up  */
static void ioat2_cleanup(struct ioat2_dma_chan *ioat)
{
	struct ioat_chan_common *chan = &ioat->base;
	unsigned long phys_complete;
	prefetch(chan->completion);
	if (!spin_trylock_bh(&chan->cleanup_lock))
		return;
	if (!ioat_cleanup_preamble(chan, &phys_complete)) {
		spin_unlock_bh(&chan->cleanup_lock);
		return;
	}
	if (!spin_trylock_bh(&ioat->ring_lock)) {
		spin_unlock_bh(&chan->cleanup_lock);
		return;
	}
	__cleanup(ioat, phys_complete);
	spin_unlock_bh(&ioat->ring_lock);
	spin_unlock_bh(&chan->cleanup_lock);
}