Source-Changes-HG archive

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

[src/trunk]: src/sys/arch No need to call arm_fdt_platform twice.



details:   https://anonhg.NetBSD.org/src/rev/2740e5a92461
branches:  trunk
changeset: 363426:2740e5a92461
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Mar 12 09:16:05 2022 +0000

description:
No need to call arm_fdt_platform twice.

diffstat:

 sys/arch/aarch64/aarch64/aarch64_machdep.c |  9 +++++----
 sys/arch/arm/arm32/arm32_machdep.c         |  9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diffs (60 lines):

diff -r 0de95b0537c8 -r 2740e5a92461 sys/arch/aarch64/aarch64/aarch64_machdep.c
--- a/sys/arch/aarch64/aarch64/aarch64_machdep.c        Sat Mar 12 08:44:38 2022 +0000
+++ b/sys/arch/aarch64/aarch64/aarch64_machdep.c        Sat Mar 12 09:16:05 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.64 2022/01/31 09:16:09 ryo Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.65 2022/03/12 09:16:05 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.64 2022/01/31 09:16:09 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.65 2022/03/12 09:16:05 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -674,8 +674,9 @@
        consinit();
 
 #ifdef FDT
-       if (arm_fdt_platform()->ap_startup != NULL)
-               arm_fdt_platform()->ap_startup();
+       const struct arm_platform * const plat = arm_fdt_platform();
+       if (plat->ap_startup != NULL)
+               plat->ap_startup();
 #endif
 
        /*
diff -r 0de95b0537c8 -r 2740e5a92461 sys/arch/arm/arm32/arm32_machdep.c
--- a/sys/arch/arm/arm32/arm32_machdep.c        Sat Mar 12 08:44:38 2022 +0000
+++ b/sys/arch/arm/arm32/arm32_machdep.c        Sat Mar 12 09:16:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm32_machdep.c,v 1.142 2021/11/13 00:13:17 jmcneill Exp $     */
+/*     $NetBSD: arm32_machdep.c,v 1.143 2022/03/12 09:16:05 skrll Exp $        */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.142 2021/11/13 00:13:17 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.143 2022/03/12 09:16:05 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -301,8 +301,9 @@
        pmap_postinit();
 
 #ifdef FDT
-       if (arm_fdt_platform()->ap_startup != NULL)
-               arm_fdt_platform()->ap_startup();
+       const struct arm_platform * const plat = arm_fdt_platform();
+       if (plat->ap_startup != NULL)
+               plat->ap_startup();
 #endif
 
        /*



Home | Main Index | Thread Index | Old Index