Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7133a15 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

lib/swiotlb.c: cleanups



There's a pointlessly braced block of code in there.  Remove the braces and
save a tabstop.

Cc: Andi Kleen <ak@suse.de>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9a3be324
Loading
Loading
Loading
Loading
+43 −46
Original line number Diff line number Diff line
@@ -331,7 +331,6 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
	 * request and allocate a buffer from that IO TLB pool.
	 */
	spin_lock_irqsave(&io_tlb_lock, flags);
	{
	index = ALIGN(io_tlb_index, stride);
	if (index >= io_tlb_nslabs)
		index = 0;
@@ -348,10 +347,9 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
		}

		/*
			 * If we find a slot that indicates we have 'nslots'
			 * number of contiguous buffers, we allocate the
			 * buffers from that slot and mark the entries as '0'
			 * indicating unavailable.
		 * If we find a slot that indicates we have 'nslots' number of
		 * contiguous buffers, we allocate the buffers from that slot
		 * and mark the entries as '0' indicating unavailable.
		 */
		if (io_tlb_list[index] >= nslots) {
			int count = 0;
@@ -363,8 +361,8 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
			dma_addr = io_tlb_start + (index << IO_TLB_SHIFT);

			/*
				 * Update the indices to avoid searching in
				 * the next round.
			 * Update the indices to avoid searching in the next
			 * round.
			 */
			io_tlb_index = ((index + nslots) < io_tlb_nslabs
					? (index + nslots) : 0);
@@ -379,7 +377,6 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir)
not_found:
	spin_unlock_irqrestore(&io_tlb_lock, flags);
	return NULL;
	}
found:
	spin_unlock_irqrestore(&io_tlb_lock, flags);