Module Name: src
Committed By: skrll
Date: Fri Dec 22 08:41:59 UTC 2023
Modified Files:
src/sys/arch/riscv/riscv: db_interface.c riscv_machdep.c
Log Message:
Minor stylistic changes. NFCI.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/riscv/db_interface.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/riscv/riscv/riscv_machdep.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/riscv/riscv/db_interface.c
diff -u src/sys/arch/riscv/riscv/db_interface.c:1.4 src/sys/arch/riscv/riscv/db_interface.c:1.5
--- src/sys/arch/riscv/riscv/db_interface.c:1.4 Sun Sep 3 08:48:20 2023
+++ src/sys/arch/riscv/riscv/db_interface.c Fri Dec 22 08:41:59 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.4 2023/09/03 08:48:20 skrll Exp $ */
+/* $NetBSD: db_interface.c,v 1.5 2023/12/22 08:41:59 skrll Exp $ */
/*
* Mach Operating System
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.4 2023/09/03 08:48:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.5 2023/12/22 08:41:59 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
@@ -88,8 +88,6 @@ paddr_t kvtophys(vaddr_t);
int
kdb_trap(int type, db_regs_t *regs)
{
- int s;
-
switch (type) {
case CAUSE_BREAKPOINT: /* breakpoint */
printf("kernel: breakpoint\n");
@@ -106,7 +104,7 @@ kdb_trap(int type, db_regs_t *regs)
break;
}
- s = splhigh();
+ const int s = splhigh();
struct cpu_info * const ci = curcpu();
#if defined(MULTIPROCESSOR)
@@ -130,9 +128,9 @@ kdb_trap(int type, db_regs_t *regs)
ddb_regs = *regs;
ci->ci_ddb_regs = &ddb_regs;
db_active++;
- cnpollc(1);
+ cnpollc(true);
db_trap(type, 0 /*code*/);
- cnpollc(0);
+ cnpollc(false);
db_active--;
ci->ci_ddb_regs = NULL;
*regs = ddb_regs;
Index: src/sys/arch/riscv/riscv/riscv_machdep.c
diff -u src/sys/arch/riscv/riscv/riscv_machdep.c:1.34 src/sys/arch/riscv/riscv/riscv_machdep.c:1.35
--- src/sys/arch/riscv/riscv/riscv_machdep.c:1.34 Sun Sep 3 08:48:20 2023
+++ src/sys/arch/riscv/riscv/riscv_machdep.c Fri Dec 22 08:41:59 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: riscv_machdep.c,v 1.34 2023/09/03 08:48:20 skrll Exp $ */
+/* $NetBSD: riscv_machdep.c,v 1.35 2023/12/22 08:41:59 skrll Exp $ */
/*-
* Copyright (c) 2014, 2019, 2022 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include "opt_riscv_debug.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: riscv_machdep.c,v 1.34 2023/09/03 08:48:20 skrll Exp $");
+__RCSID("$NetBSD: riscv_machdep.c,v 1.35 2023/12/22 08:41:59 skrll Exp $");
#include <sys/param.h>
@@ -460,13 +460,13 @@ cpu_reboot(int howto, char *bootstr)
printf("\n");
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
- cnpollc(1); /* for proper keyboard command handling */
+ cnpollc(true); /* for proper keyboard command handling */
if (cngetc() == 0) {
/* no console attached, so just hlt */
printf("No keyboard - cannot reboot after all.\n");
goto spin;
}
- cnpollc(0);
+ cnpollc(false);
}
printf("rebooting...\n");