Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 Style. NFCI.



details:   https://anonhg.NetBSD.org/src/rev/4c3c6c611457
branches:  trunk
changeset: 365929:4c3c6c611457
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue May 03 20:10:20 2022 +0000

description:
Style. NFCI.

diffstat:

 sys/arch/aarch64/aarch64/efi_machdep.c |  15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diffs (58 lines):

diff -r 66239c435f19 -r 4c3c6c611457 sys/arch/aarch64/aarch64/efi_machdep.c
--- a/sys/arch/aarch64/aarch64/efi_machdep.c    Tue May 03 20:09:54 2022 +0000
+++ b/sys/arch/aarch64/aarch64/efi_machdep.c    Tue May 03 20:10:20 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_machdep.c,v 1.12 2022/04/27 23:38:31 ryo Exp $ */
+/* $NetBSD: efi_machdep.c,v 1.13 2022/05/03 20:10:20 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efi_machdep.c,v 1.12 2022/04/27 23:38:31 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_machdep.c,v 1.13 2022/05/03 20:10:20 skrll Exp $");
 
 #include <sys/param.h>
 #include <uvm/uvm_extern.h>
@@ -106,11 +106,9 @@
 int
 arm_efirt_md_enter(void)
 {
-       struct lwp *l;
-       int err;
+       kpreempt_disable();
 
-       kpreempt_disable();
-       l = curlwp;
+       struct lwp * const l = curlwp;
 
        /* Save FPU state */
        arm_efirt_state.fpu_used = fpu_used_p(l) != 0;
@@ -125,7 +123,7 @@
         * Install custom fault handler. EFI lock is held across calls so
         * shared faultbuf is safe here.
         */
-       err = cpu_set_onfault(&arm_efirt_state.faultbuf);
+       int err = cpu_set_onfault(&arm_efirt_state.faultbuf);
        if (err)
                return err;
 
@@ -142,7 +140,7 @@
 void
 arm_efirt_md_exit(void)
 {
-       struct lwp *l = curlwp;
+       struct lwp * const l = curlwp;
 
        if (efi_userva) {
                pmap_deactivate_efirt();
@@ -151,7 +149,6 @@
                }
        }
 
-
        /* Disable FP access */
        reg_cpacr_el1_write(CPACR_FPEN_NONE);
        isb();



Home | Main Index | Thread Index | Old Index