Skip to contentSkip to conversation

nommu: fix compilation of nommu.c

PATCH In review [email protected] 2 participants 2 messages Jun 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nommu: fix compilation of nommu.c

From: Greg Ungerer <[email protected]>

Compiling 3.5-rc1 for nommu targets gives:

CC mm/nommu.o
mm/nommu.c: In function ‘sys_mmap_pgoff’:
mm/nommu.c:1489:2: error: ‘ret’ undeclared (first use in this function) mm/nommu.c:1489:2: note: each undeclared identifier is reported only once for each function it appears in

It is trivially fixed by replacing 'ret' with the local variable that is already defined for the return value 'retval'.

---
 mm/nommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mm/nommu.c +1 -1
index c4acfbc..d4b0c10 100644
@@ -1486,7 +1486,7 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
 
 	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
 
-	ret = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+	retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
 
 	if (file)
 		fput(file);
Signature · 1 line
1.7.0.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Mon, Jun 04, 2012 at 02:29:59PM +1000, [email protected] wrote:

From: Greg Ungerer <[email protected]>

Compiling 3.5-rc1 for nommu targets gives:

CC mm/nommu.o
mm/nommu.c: In function ???sys_mmap_pgoff???:
mm/nommu.c:1489:2: error: ???ret??? undeclared (first use in this function) mm/nommu.c:1489:2: note: each undeclared identifier is reported only once for each function it appears in

Quoted 4 lines

It is trivially fixed by replacing 'ret' with the local variable that is already defined for the return value 'retval'.