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

Commit ddb033c2 authored by Shiraz Hashim's avatar Shiraz Hashim Committed by Gerrit - the friendly Code Review server
Browse files

arm: dma-mapping: fix data types to hold size_t



size_t type data should not be held under variable of type
int, as this can truncate large values especially on a
64bit system. Fix it.

Change-Id: I5ad1ab321738772a99920e3fa287bda266cb05ed
Signed-off-by: default avatarShiraz Hashim <shashim@codeaurora.org>
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
Signed-off-by: default avatarVijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: default avatarQingqing Zhou <qqzhou@codeaurora.org>
parent c33865b0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1302,8 +1302,8 @@ static struct page **__iommu_alloc_buffer(struct device *dev, size_t size,
					  int coherent_flag)
{
	struct page **pages;
	int count = size >> PAGE_SHIFT;
	int array_size = count * sizeof(struct page *);
	size_t count = size >> PAGE_SHIFT;
	size_t array_size = count * sizeof(struct page *);
	int i = 0;
	int order_idx = 0;