From c3d6fcc7e6d02d5bd26a4cdc67bd43de7c976631 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 23 Nov 2021 01:03:35 +0000 Subject: [PATCH] limit a variable to the scope inside #ifdef where it is used --- sys/arch/arm64/arm64/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c index 45694108c29..4f7df211c2b 100644 --- a/sys/arch/arm64/arm64/cpu.c +++ b/sys/arch/arm64/arm64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.57 2021/11/22 19:22:59 kettenis Exp $ */ +/* $OpenBSD: cpu.c,v 1.58 2021/11/23 01:03:35 deraadt Exp $ */ /* * Copyright (c) 2016 Dale Rahn @@ -605,7 +605,6 @@ cpu_attach(struct device *parent, struct device *dev, void *aux) struct fdt_attach_args *faa = aux; struct cpu_info *ci; uint64_t mpidr = READ_SPECIALREG(mpidr_el1); - uint64_t midr = READ_SPECIALREG(midr_el1); uint64_t id_aa64mmfr1, sctlr; uint32_t opp; @@ -638,6 +637,7 @@ cpu_attach(struct device *parent, struct device *dev, void *aux) #ifdef MULTIPROCESSOR if (ci->ci_flags & CPUF_AP) { + uint64_t midr = READ_SPECIALREG(midr_el1); char buf[32]; uint64_t spinup_data = 0; int spinup_method = 0; -- 2.20.1