Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sh3/sh3 Restore braces for if/else statements which...
details: https://anonhg.NetBSD.org/src/rev/d5b8ff0dc160
branches: trunk
changeset: 1023458:d5b8ff0dc160
user: rin <rin%NetBSD.org@localhost>
date: Wed Sep 08 11:59:43 2021 +0000
description:
Restore braces for if/else statements which have logically single line,
but physically multiple lines.
This is recommended by an example in style:
http://cvsweb.netbsd.org/bsdweb.cgi/src/share/misc/style#rev1.58
Thanks tsutsui@ for pointing it out.
diffstat:
sys/arch/sh3/sh3/pmap.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (48 lines):
diff -r 033d945c65bc -r d5b8ff0dc160 sys/arch/sh3/sh3/pmap.c
--- a/sys/arch/sh3/sh3/pmap.c Wed Sep 08 11:20:44 2021 +0000
+++ b/sys/arch/sh3/sh3/pmap.c Wed Sep 08 11:59:43 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.92 2021/09/08 07:25:55 rin Exp $ */
+/* $NetBSD: pmap.c,v 1.93 2021/09/08 11:59:43 rin Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2021/09/08 07:25:55 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.93 2021/09/08 11:59:43 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -371,14 +371,15 @@
panic("%s: cannot allocate pv", __func__);
}
} else { /* bus-space (always uncached map) */
- if (kva)
+ if (kva) {
entry |= PG_V | PG_SH |
((prot & VM_PROT_WRITE) ?
(PG_PR_KRW | PG_D) : PG_PR_KRO);
- else
+ } else {
entry |= PG_V |
((prot & VM_PROT_WRITE) ?
(PG_PR_URW | PG_D) : PG_PR_URO);
+ }
}
/* Register to page table */
@@ -788,9 +789,10 @@
sh_dcache_wbinv_all();
memcpy((void *)SH3_PHYS_TO_P2SEG(dst),
(void *)SH3_PHYS_TO_P2SEG(src), PAGE_SIZE);
- } else
+ } else {
memcpy((void *)SH3_PHYS_TO_P1SEG(dst),
(void *)SH3_PHYS_TO_P1SEG(src), PAGE_SIZE);
+ }
}
bool
Home |
Main Index |
Thread Index |
Old Index