From: Mike Frysinger Date: Tue, 9 Jun 2009 23:26:23 +0000 (-0700) Subject: shm: fix unused warnings on nommu X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=586c7e6a280580fd94b662bf486f9bb31098d14b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git shm: fix unused warnings on nommu The massive nommu update (8feae131) resulted in these warnings: ipc/shm.c: In function `sys_shmdt': ipc/shm.c:974: warning: unused variable `size' ipc/shm.c:972: warning: unused variable `next' Signed-off-by: Mike Frysinger Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/shm.c b/ipc/shm.c index faa46da99ebe..425971600485 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -969,10 +969,13 @@ SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) { struct mm_struct *mm = current->mm; - struct vm_area_struct *vma, *next; + struct vm_area_struct *vma; unsigned long addr = (unsigned long)shmaddr; - loff_t size = 0; int retval = -EINVAL; +#ifdef CONFIG_MMU + loff_t size = 0; + struct vm_area_struct *next; +#endif if (addr & ~PAGE_MASK) return retval;