Module Name:    src
Committed By:   yamaguchi
Date:           Thu Dec 23 02:45:44 UTC 2021

Modified Files:
        src/sys/arch/x86/x86: intr.c

Log Message:
Move the variable into the section that uses it


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.158 src/sys/arch/x86/x86/intr.c:1.159
--- src/sys/arch/x86/x86/intr.c:1.158	Thu Dec 23 02:10:53 2021
+++ src/sys/arch/x86/x86/intr.c	Thu Dec 23 02:45:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.158 2021/12/23 02:10:53 yamaguchi Exp $	*/
+/*	$NetBSD: intr.c,v 1.159 2021/12/23 02:45:43 yamaguchi Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009, 2019 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.158 2021/12/23 02:10:53 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.159 2021/12/23 02:45:43 yamaguchi Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -508,7 +508,6 @@ intr_allocate_slot(struct pic *pic, int 
 	struct cpu_info *ci, *lci;
 	struct intrsource *isp;
 	int slot = 0, idtvec, error;
-	struct idt_vec *iv;
 
 	KASSERT(mutex_owned(&cpu_lock));
 
@@ -606,6 +605,8 @@ intr_allocate_slot(struct pic *pic, int 
 		 * are used by a device using MSI multiple vectors must be
 		 * continuous.
 		 */
+		struct idt_vec *iv;
+
 		iv = idt_vec_ref(&ci->ci_idtvec);
 		idtvec = idt_vec_alloc(iv, APIC_LEVEL(level), IDT_INTR_HIGH);
 	}

Reply via email to