diff options
author | Subhajit Paul | 2016-11-14 03:49:33 -0600 |
---|---|---|
committer | Anand Balagopalakrishnan | 2016-11-18 08:40:25 -0600 |
commit | bc3128527024bd76f9ab4d8d7db13ad65a24458b (patch) | |
tree | 1b870db6d6267f61e788e33f91c68ba5cba4eebf | |
parent | e68719ba7c54602c710b6615cd665f5b7f47f85e (diff) | |
download | omap5-sgx-ddk-linux-bc3128527024bd76f9ab4d8d7db13ad65a24458b.tar.gz omap5-sgx-ddk-linux-bc3128527024bd76f9ab4d8d7db13ad65a24458b.tar.xz omap5-sgx-ddk-linux-bc3128527024bd76f9ab4d8d7db13ad65a24458b.zip |
km: fix error in calculating size of page array
This function was earlier calculating npages in a wrong way,
probably due to wrong placement of braces.
As a result, the allocation size was always much larger than
what is actually required.
Change-Id: Ic25203eca7447bc0eb24b948a3385920cddc032e
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Reviewed-on: https://gerrit.ext.ti.com/gerrit/omap/14321
Reviewed-by: Eric Ruei <e-ruei1@ti.com>
-rw-r--r-- | eurasia_km/services4/srvkm/env/linux/dmabuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/eurasia_km/services4/srvkm/env/linux/dmabuf.c b/eurasia_km/services4/srvkm/env/linux/dmabuf.c index 8e26d7c..9c35184 100644 --- a/eurasia_km/services4/srvkm/env/linux/dmabuf.c +++ b/eurasia_km/services4/srvkm/env/linux/dmabuf.c | |||
@@ -127,7 +127,7 @@ PVRSRV_ERROR DmaBufImportAndAcquirePhysAddr(IMG_INT32 i32DmaBufFD, | |||
127 | 127 | ||
128 | for_each_sg(import->sg_table->sgl, sg, import->sg_table->nents, i) | 128 | for_each_sg(import->sg_table->sgl, sg, import->sg_table->nents, i) |
129 | { | 129 | { |
130 | npages += PAGE_ALIGN(sg_dma_len(sg) / PAGE_SIZE); | 130 | npages += (PAGE_ALIGN(sg_dma_len(sg)) / PAGE_SIZE); |
131 | } | 131 | } |
132 | 132 | ||
133 | /* The following allocation will be freed by the caller */ | 133 | /* The following allocation will be freed by the caller */ |