Commit 95b079d8 authored by Claire Chang's avatar Claire Chang Committed by Konrad Rzeszutek Wilk

swiotlb: Fix the type of index

Fix the type of index from unsigned int to int since find_slots() might
return -1.

Fixes: 26a7e094 ("swiotlb: refactor swiotlb_tbl_map_single")
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarClaire Chang <tientzu@chromium.org>
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad@kernel.org>
parent 2726bf3f
......@@ -499,7 +499,8 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr,
{
struct io_tlb_mem *mem = io_tlb_default_mem;
unsigned int offset = swiotlb_align_offset(dev, orig_addr);
unsigned int index, i;
unsigned int i;
int index;
phys_addr_t tlb_addr;
if (!mem)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment