* Paolo Ciarrocchi [EMAIL PROTECTED] wrote:
Before:
total: 34 errors, 14 warnings, 456 lines checked
After:
total: 0 errors, 8 warnings, 456 lines checked
sidenote: please also indicate to maintainers that the cleanup causes no
change in generated code. Find below of how one of your cleanup patches
looks like in its final form in x86.git. (i auto-generated all of the
commit log)
info like that makes it easier for maintainers to see the intended zero
impact of your changes.
Ingo
--
Subject: x86: coding style fixes to arch/x86/kernel/vm86_32.c
From: Paolo Ciarrocchi [EMAIL PROTECTED]
Date: Fri, 22 Feb 2008 23:10:40 +0100
Before:
total: 64 errors, 18 warnings, 840 lines checked
After:
total: 12 errors, 15 warnings, 844 lines checked
No code changed:
arch/x86/kernel/vm86_32.o:
textdata bss dec hex filename
4449 28 13246091201 vm86_32.o.before
4449 28 13246091201 vm86_32.o.after
md5:
e4e51ed7689d17f04148554a3c6d5bb6 vm86_32.o.before.asm
e4e51ed7689d17f04148554a3c6d5bb6 vm86_32.o.after.asm
Signed-off-by: Paolo Ciarrocchi [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
---
arch/x86/kernel/vm86_32.c | 174 +++---
1 file changed, 89 insertions(+), 85 deletions(-)
Index: linux-x86.q/arch/x86/kernel/vm86_32.c
===
--- linux-x86.q.orig/arch/x86/kernel/vm86_32.c
+++ linux-x86.q/arch/x86/kernel/vm86_32.c
@@ -64,7 +64,7 @@
#define KVM86 ((struct kernel_vm86_struct *)regs)
-#define VMPI KVM86-vm86plus
+#define VMPI KVM86-vm86plus
/*
@@ -81,7 +81,7 @@
#define VFLAGS (*(unsigned short *)(current-thread.v86flags))
#define VEFLAGS(current-thread.v86flags)
-#define set_flags(X,new,mask) \
+#define set_flags(X, new, mask) \
((X) = ((X) ~(mask)) | ((new) (mask)))
#define SAFE_MASK (0xDD5)
@@ -93,8 +93,10 @@ static int copy_vm86_regs_to_user(struct
{
int ret = 0;
- /* kernel_vm86_regs is missing gs, so copy everything up to
- (but not including) orig_eax, and then rest including orig_eax. */
+ /*
+* kernel_vm86_regs is missing gs, so copy everything up to
+* (but not including) orig_eax, and then rest including orig_eax.
+*/
ret += copy_to_user(user, regs, offsetof(struct kernel_vm86_regs,
pt.orig_ax));
ret += copy_to_user(user-orig_eax, regs-pt.orig_ax,
sizeof(struct kernel_vm86_regs) -
@@ -120,7 +122,7 @@ static int copy_vm86_regs_from_user(stru
return ret;
}
-struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
+struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
{
struct tss_struct *tss;
struct pt_regs *ret;
@@ -138,8 +140,8 @@ struct pt_regs * save_v86_state(struct k
do_exit(SIGSEGV);
}
set_flags(regs-pt.flags, VEFLAGS, VIF_MASK | current-thread.v86mask);
- tmp = copy_vm86_regs_to_user(current-thread.vm86_info-regs,regs);
- tmp +=
put_user(current-thread.screen_bitmap,current-thread.vm86_info-screen_bitmap);
+ tmp = copy_vm86_regs_to_user(current-thread.vm86_info-regs, regs);
+ tmp += put_user(current-thread.screen_bitmap,
current-thread.vm86_info-screen_bitmap);
if (tmp) {
printk(vm86: could not access userspace vm86_info\n);
do_exit(SIGSEGV);
@@ -237,20 +239,21 @@ asmlinkage int sys_vm86(struct pt_regs r
tsk = current;
switch (regs.bx) {
- case VM86_REQUEST_IRQ:
- case VM86_FREE_IRQ:
- case VM86_GET_IRQ_BITS:
- case VM86_GET_AND_RESET_IRQ:
- ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
- goto out;
- case VM86_PLUS_INSTALL_CHECK:
- /* NOTE: on old vm86 stuff this will return the error
- from access_ok(), because the subfunction is
- interpreted as (invalid) address to vm86_struct.
- So the installation check works.
-*/
- ret = 0;
- goto out;
+ case VM86_REQUEST_IRQ:
+ case VM86_FREE_IRQ:
+ case VM86_GET_IRQ_BITS:
+ case VM86_GET_AND_RESET_IRQ:
+ ret = do_vm86_irq_handling(regs.bx, (int)regs.cx);
+ goto out;
+ case VM86_PLUS_INSTALL_CHECK:
+ /*
+* NOTE: on old vm86 stuff this will return the error
+* from access_ok(), because the subfunction is
+* interpreted as (invalid) address to vm86_struct.
+* So the installation check works.
+*/
+ ret = 0;
+ goto out;
}
/* we come here only for functions VM86_ENTER,