linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH 2/7] UML - Fix a couple of warnings
@ 2005-05-26 22:30 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2005-05-26 22:30 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel, user-mode-linux-devel

Eliminate an unused variable warning in ptrace.c and a size mismatch warning
by adding a cast to __pa.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: linux-2.6.12-rc/arch/um/kernel/ptrace.c
===================================================================
--- linux-2.6.12-rc.orig/arch/um/kernel/ptrace.c	2005-05-08 11:43:01.000000000 -0400
+++ linux-2.6.12-rc/arch/um/kernel/ptrace.c	2005-05-11 10:44:30.000000000 -0400
@@ -322,11 +322,9 @@ void syscall_trace(union uml_pt_regs *re
 					    UPT_SYSCALL_ARG2(regs),
 					    UPT_SYSCALL_ARG3(regs),
 					    UPT_SYSCALL_ARG4(regs));
-		else {
-                        int res = UPT_SYSCALL_RET(regs);
-			audit_syscall_exit(current, AUDITSC_RESULT(res),
-                                           res);
-                }
+		else audit_syscall_exit(current, 
+                                        AUDITSC_RESULT(UPT_SYSCALL_RET(regs)),
+                                        UPT_SYSCALL_RET(regs));
 	}
 
 	/* Fake a debug trap */
@@ -356,14 +354,3 @@ void syscall_trace(union uml_pt_regs *re
 		current->exit_code = 0;
 	}
 }
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
Index: linux-2.6.12-rc/include/asm-um/page.h
===================================================================
--- linux-2.6.12-rc.orig/include/asm-um/page.h	2005-05-11 10:18:52.000000000 -0400
+++ linux-2.6.12-rc/include/asm-um/page.h	2005-05-11 10:37:30.000000000 -0400
@@ -98,7 +98,13 @@ extern unsigned long uml_physmem;
 
 extern unsigned long to_phys(void *virt);
 extern void *to_virt(unsigned long phys);
-#define __pa(virt) to_phys((void *) virt)
+
+/* Cast to unsigned long before casting to void * to avoid a warning from
+ * mmap_kmem about cutting a long long down to a void *.  Not sure that 
+ * casting is the right thing, but 32-bit UML can't have 64-bit virtual 
+ * addresses 
+ */
+#define __pa(virt) to_phys((void *) (unsigned long) virt)
 #define __va(phys) to_virt((unsigned long) phys)
 
 #define page_to_pfn(page) ((page) - mem_map)



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-26 22:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-26 22:30 [uml-devel] [PATCH 2/7] UML - Fix a couple of warnings Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox