summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-03-26 23:27:45 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2017-03-26 23:27:45 +0000
commit1ac92bb0c29df563c5d9a273f272fb39827c4f66 (patch)
treeeec7ddc54ba1737f3520e88a6aaef67f26aefc6e /sys/arch
parent152d48cb5e8f25581f8b8ad55840826683c407ec (diff)
KNF
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/amd64/codepatch.c8
-rw-r--r--sys/arch/i386/i386/codepatch.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/sys/arch/amd64/amd64/codepatch.c b/sys/arch/amd64/amd64/codepatch.c
index c0a33bbe5eb..41bd08fc906 100644
--- a/sys/arch/amd64/amd64/codepatch.c
+++ b/sys/arch/amd64/amd64/codepatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: codepatch.c,v 1.2 2015/04/19 06:30:20 sf Exp $ */
+/* $OpenBSD: codepatch.c,v 1.3 2017/03/26 23:27:44 jca Exp $ */
/*
* Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de>
*
@@ -69,7 +69,8 @@ codepatch_fill_nop(void *caddr, uint16_t len)
* Create writeable aliases of memory we need
* to write to as kernel is mapped read-only
*/
-void *codepatch_maprw(vaddr_t *nva, vaddr_t dest)
+void *
+codepatch_maprw(vaddr_t *nva, vaddr_t dest)
{
paddr_t kva = trunc_page((paddr_t)dest);
paddr_t po = (paddr_t)dest & PAGE_MASK;
@@ -88,7 +89,8 @@ void *codepatch_maprw(vaddr_t *nva, vaddr_t dest)
return (void *)(*nva + po);
}
-void codepatch_unmaprw(vaddr_t nva)
+void
+codepatch_unmaprw(vaddr_t nva)
{
if (nva == 0)
return;
diff --git a/sys/arch/i386/i386/codepatch.c b/sys/arch/i386/i386/codepatch.c
index b1648548d1b..9b5b305bc2a 100644
--- a/sys/arch/i386/i386/codepatch.c
+++ b/sys/arch/i386/i386/codepatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: codepatch.c,v 1.1 2015/04/19 06:27:17 sf Exp $ */
+/* $OpenBSD: codepatch.c,v 1.2 2017/03/26 23:27:44 jca Exp $ */
/*
* Copyright (c) 2014-2015 Stefan Fritsch <sf@sfritsch.de>
*
@@ -97,7 +97,8 @@ singlebyte:
* Create writeable aliases of memory we need
* to write to as kernel is mapped read-only
*/
-void *codepatch_maprw(vaddr_t *nva, vaddr_t dest)
+void *
+codepatch_maprw(vaddr_t *nva, vaddr_t dest)
{
paddr_t kva = trunc_page((paddr_t)dest);
paddr_t po = (paddr_t)dest & PAGE_MASK;
@@ -116,7 +117,8 @@ void *codepatch_maprw(vaddr_t *nva, vaddr_t dest)
return (void *)(*nva + po);
}
-void codepatch_unmaprw(vaddr_t nva)
+void
+codepatch_unmaprw(vaddr_t nva)
{
if (nva == 0)
return;