Skip to contentSkip to conversation

staging: fix Android binder compilation

PATCH In review Mike Rapoport 2 participants 2 messages Jan 22, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fix Android binder compilation

Building kernel with ARCH=arm and xm_x2xx_defconfig and Android binder driver enabled gives the following error:

CC drivers/staging/android/binder.o
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_vma_open':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2652: error:
request for member 'pgprot' in something not a structure or union /mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_vma_close':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2659: error:
request for member 'pgprot' in something not a structure or union /mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_mmap':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2680: error:
request for member 'pgprot' in something not a structure or union

Fix it.

 drivers/staging/android/binder.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/android/binder.c +0 -1
index 6a4ceac..ab014bc 100644
@@ -2649,14 +2649,14 @@ static void binder_vma_open(struct vm_area_struct *vma)
 {
 	struct binder_proc *proc = vma->vm_private_data;
 	if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
-		printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -

vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
+ printk(KERN_INFO "binder: %d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -
vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));
dump_stack();
}
static void binder_vma_close(struct vm_area_struct *vma)
{
struct binder_proc *proc = vma->vm_private_data;
if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
- printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -
vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
+ printk(KERN_INFO "binder: %d close vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -
vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));
proc->vma = NULL;
}

@@ -2677,7 +2677,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
vma->vm_end = vma->vm_start + SZ_4M;

if (binder_debug_mask & BINDER_DEBUG_OPEN_CLOSE)
- printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -
vma->vm_start) / SZ_1K, vma->vm_flags, vma->vm_page_prot.pgprot);
+ printk(KERN_INFO "binder_mmap: %d %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end -
vma->vm_start) / SZ_1K, vma->vm_flags, pgprot_val(vma->vm_page_prot));

if (vma->vm_flags & FORBIDDEN_MMAP_FLAGS) {
ret = -EPERM;

Signature · 2 lines
Sincerely yours,
Mike.
#1 lore raw
Quoted 17 lines · Mike Rapoport

Building kernel with ARCH=arm and xm_x2xx_defconfig and Android binder driver enabled gives the following error:

CC drivers/staging/android/binder.o
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_vma_open':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2652: error:
request for member 'pgprot' in something not a structure or union /mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_vma_close':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2659: error:
request for member 'pgprot' in something not a structure or union /mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c: In function 'binder_mmap':
/mnt/sdb1/git/linux-2.6-arm/drivers/staging/android/binder.c:2680: error:
request for member 'pgprot' in something not a structure or union

Quoted 1 line

Fix it.

Thanks, but this is already fixed in the -next tree and will be sent to Linus when he returns from linux.conf.au next week or so.

greg k-h