mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
UPSTREAM: swiotlb: Fix the type of index
[ Upstream commit95b079d821] Fix the type of index from unsigned int to int since find_slots() might return -1. Fixes:26a7e09478("swiotlb: refactor swiotlb_tbl_map_single") Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Claire Chang <tientzu@chromium.org> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commita01572e21f) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I352263b74ff89334c1e3fd6f1b70e1c08b7f2b47
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
26a8c2ab13
commit
762674c166
@@ -563,7 +563,8 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr,
|
||||
enum dma_data_direction dir, unsigned long attrs)
|
||||
{
|
||||
unsigned int offset = swiotlb_align_offset(dev, orig_addr);
|
||||
unsigned int index, i;
|
||||
unsigned int i;
|
||||
int index;
|
||||
phys_addr_t tlb_addr;
|
||||
|
||||
if (no_iotlb_memory)
|
||||
|
||||
Reference in New Issue
Block a user