Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 Remove unused include, remove dead code...
details: https://anonhg.NetBSD.org/src/rev/cc2150092f5a
branches: trunk
changeset: 355762:cc2150092f5a
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Aug 13 07:16:44 2017 +0000
description:
Remove unused include, remove dead code, KNF, and fix off-by-one.
diffstat:
sys/arch/amd64/amd64/process_machdep.c | 25 +++++++++----------------
1 files changed, 9 insertions(+), 16 deletions(-)
diffs (90 lines):
diff -r 1e1423e859a3 -r cc2150092f5a sys/arch/amd64/amd64/process_machdep.c
--- a/sys/arch/amd64/amd64/process_machdep.c Sun Aug 13 05:04:08 2017 +0000
+++ b/sys/arch/amd64/amd64/process_machdep.c Sun Aug 13 07:16:44 2017 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: process_machdep.c,v 1.33 2017/08/08 17:27:34 maxv Exp $ */
+/* $NetBSD: process_machdep.c,v 1.34 2017/08/13 07:16:44 maxv Exp $ */
-/*-
+/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
@@ -71,19 +71,16 @@
*
* process_set_pc(proc)
* Set the process's program counter.
- *
*/
-
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.33 2017/08/08 17:27:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.34 2017/08/13 07:16:44 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/proc.h>
-#include <sys/vnode.h>
#include <sys/ptrace.h>
#include <machine/psl.h>
@@ -93,16 +90,12 @@
#include <x86/fpu.h>
static inline struct trapframe *process_frame(struct lwp *);
-#if 0
-static inline int verr_gdt(struct pmap *, int sel);
-static inline int verr_ldt(struct pmap *, int sel);
-#endif
static inline struct trapframe *
process_frame(struct lwp *l)
{
- return (l->l_md.md_regs);
+ return l->l_md.md_regs;
}
int
@@ -114,7 +107,7 @@
_FRAME_GREG(copy_to_reg)
#undef copy_to_reg
- return (0);
+ return 0;
}
int
@@ -162,7 +155,7 @@
tf->tf_err = err;
tf->tf_trapno = trapno;
- return (0);
+ return 0;
}
int
@@ -200,7 +193,7 @@
else
tf->tf_rflags &= ~PSL_T;
- return (0);
+ return 0;
}
int
@@ -208,9 +201,9 @@
{
struct trapframe *tf = process_frame(l);
- if ((uint64_t)addr > VM_MAXUSER_ADDRESS)
+ if ((uint64_t)addr >= VM_MAXUSER_ADDRESS)
return EINVAL;
tf->tf_rip = (uint64_t)addr;
- return (0);
+ return 0;
}
Home |
Main Index |
Thread Index |
Old Index