Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Work around a compiler issue when building on a...



details:   https://anonhg.NetBSD.org/src/rev/12a7abc98079
branches:  trunk
changeset: 1009126:12a7abc98079
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Apr 13 12:08:05 2020 +0000

description:
Work around a compiler issue when building on aarch64 with KUBSAN.

diffstat:

 sys/dev/acpi/acpi_mcfg.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 838ddb8d2d9c -r 12a7abc98079 sys/dev/acpi/acpi_mcfg.c
--- a/sys/dev/acpi/acpi_mcfg.c  Mon Apr 13 11:44:20 2020 +0000
+++ b/sys/dev/acpi/acpi_mcfg.c  Mon Apr 13 12:08:05 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_mcfg.c,v 1.18 2020/02/02 16:31:25 jmcneill Exp $  */
+/*     $NetBSD: acpi_mcfg.c,v 1.19 2020/04/13 12:08:05 jmcneill Exp $  */
 
 /*-
  * Copyright (C) 2015 NONAKA Kimihiro <nonaka%NetBSD.org@localhost>
@@ -28,7 +28,7 @@
 #include "opt_pci.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.18 2020/02/02 16:31:25 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.19 2020/04/13 12:08:05 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -750,7 +750,8 @@
                }
                ex = pcires->memext;
                s = "non-prefetchable";
-       } else if (res->Data.Address.ResourceType == ACPI_IO_RANGE) {
+       } else {
+               KASSERT(res->Data.Address.ResourceType == ACPI_IO_RANGE);
                if (pcires->ioext == NULL) {
                        pcires->ioext = extent_create("pciio", 0, ULONG_MAX,
                            NULL, 0, EX_WAITOK);
@@ -764,7 +765,6 @@
                }
                ex = pcires->ioext;
                s = "i/o";
-               
        }
 
        switch (res->Type) {



Home | Main Index | Thread Index | Old Index