Module Name:    src
Committed By:   rin
Date:           Wed Sep  8 11:59:43 UTC 2021

Modified Files:
        src/sys/arch/sh3/sh3: pmap.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sh3/sh3/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sh3/sh3/pmap.c
diff -u src/sys/arch/sh3/sh3/pmap.c:1.92 src/sys/arch/sh3/sh3/pmap.c:1.93
--- src/sys/arch/sh3/sh3/pmap.c:1.92	Wed Sep  8 07:25:55 2021
+++ src/sys/arch/sh3/sh3/pmap.c	Wed Sep  8 11:59:43 2021
@@ -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 @@ pmap_enter(pmap_t pmap, vaddr_t va, padd
 			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 @@ pmap_copy_page(paddr_t src, paddr_t dst)
 		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

Reply via email to