DORMANTno replies

[PATCH] ARM: dma-mapping: Fix the type used for consistent_pte size calculation

From: Ajeet Yadav <hidden>
Date: 2012-02-22 03:35:56
Also in: lkml
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

To be consistent with declaration and usage of consistent_pte, it needs
to be an array of (pte *)

Signed-off-by: Ajeet Yadav <redacted>
---
 arch/arm/mm/dma-mapping.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 1aa664a..04bfa76 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -170,7 +170,7 @@ static int __init consistent_init(void)
 	unsigned long base = consistent_base;
 	unsigned long num_ptes = (CONSISTENT_END - base) >> PMD_SHIFT;
 
-	consistent_pte = kmalloc(num_ptes * sizeof(pte_t), GFP_KERNEL);
+	consistent_pte = kmalloc(num_ptes * sizeof(pte_t *), GFP_KERNEL);
 	if (!consistent_pte) {
 		pr_err("%s: no memory\n", __func__);
 		return -ENOMEM;
-- 
1.7.8.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help