Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83e714e8 authored by Paolo Ciarrocchi's avatar Paolo Ciarrocchi Committed by Ingo Molnar
Browse files

x86: coding style fixes to arch/x86/kernel/vm86_32.c



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:

   text	   data	    bss	    dec	    hex	filename
   4449	     28	    132	   4609	   1201	vm86_32.o.before
   4449	     28	    132	   4609	   1201	vm86_32.o.after

md5:
   e4e51ed7689d17f04148554a3c6d5bb6  vm86_32.o.before.asm
   e4e51ed7689d17f04148554a3c6d5bb6  vm86_32.o.after.asm

Signed-off-by: default avatarPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent fb87a298
Loading
Loading
Loading
Loading
+89 −85
Original line number Diff line number Diff line
@@ -93,8 +93,10 @@ static int copy_vm86_regs_to_user(struct vm86_regs __user *user,
{
	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) -
@@ -244,10 +246,11 @@ asmlinkage int sys_vm86(struct pt_regs regs)
		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.
		/*
		 * 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;
@@ -380,7 +383,8 @@ static inline void clear_AC(struct kernel_vm86_regs * regs)
	regs->pt.flags &= ~AC_MASK;
}

/* It is correct to call set_IF(regs) from the set_vflags_*
/*
 * It is correct to call set_IF(regs) from the set_vflags_*
 * functions. However someone forgot to call clear_IF(regs)
 * in the opposite case.
 * After the command sequence CLI PUSHF STI POPF you should
@@ -636,11 +640,11 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code)
		}
		IP(regs) = ip;
		CHECK_IF_IN_TRAP;
		if (data32) {
		if (data32)
			set_vflags_long(newflags, regs);
		} else {
		else
			set_vflags_short(newflags, regs);
		}

		VM86_FAULT_RETURN;
		}