Skip to contentSkip to conversation

Fix build error with strict mm checking

PATCH In review Martin Habets 2 participants 2 messages Jun 12, 2007 – Jun 13, 2007 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix build error with strict mm checking

Turning on STRICT_MM_TYPECHECKS in include/asm/page.h causes a build error for sparc32. This patch against 2.6.21 fixes this.

Martin

---

sound/core/sgbuf.c renamed from sound/core/sgbuf.c.orig +1 -1
@@ -96,7 +96,7 @@ void *snd_malloc_sgbuf_pages(struct devi
 	}
 
 	sgbuf->size = size;
-	dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, PAGE_KERNEL);
+	dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, __pgprot(PAGE_KERNEL));
 	if (! dmab->area)
 		goto _failed;
 	return dmab->area;
#1 lore raw

At Wed, 13 Jun 2007 00:18:57 +0100,

Quoted 3 lines · Martin Habets

Turning on STRICT_MM_TYPECHECKS in include/asm/page.h causes a build error for sparc32. This patch against 2.6.21 fixes this.

Are you sure that this fix is needed for the latest 2.6.22-rc? PAGE_KERNEL is basically defined like __pgprot(__PAGE_KERNEL) on most architectures. If you need extra __pgprot() there, then it must be a bug specific to sparc32 arch.

Takashi

Quoted 17 lines

Martin

---

sound/core/sgbuf.c renamed from sound/core/sgbuf.c.orig +1 -1
@@ -96,7 +96,7 @@ void *snd_malloc_sgbuf_pages(struct devi
 	}
 
 	sgbuf->size = size;
-	dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, PAGE_KERNEL);
+	dmab->area = vmap(sgbuf->page_table, sgbuf->pages, VM_MAP, __pgprot(PAGE_KERNEL));
 	if (! dmab->area)
 		goto _failed;
 	return dmab->area;