kernel: Remove MPASS{,4} entirely and use KKASSERT instead.
authorSascha Wildner <saw@online.de>
Sat, 8 Dec 2012 20:58:34 +0000 (21:58 +0100)
committerSascha Wildner <saw@online.de>
Sat, 8 Dec 2012 20:58:34 +0000 (21:58 +0100)
In-discussion-with: ftigeot

sys/dev/acpica5/acpi_pci_link.c
sys/sys/lock.h

index a02d842..5b18f6b 100644 (file)
@@ -746,8 +746,8 @@ acpi_pci_link_srs_from_crs(struct acpi_pci_link_softc *sc, ACPI_BUFFER *srsbuf)
                        resptr = NULL;
                        break;
                case ACPI_RESOURCE_TYPE_IRQ:
-                       MPASS(i < sc->pl_num_links);
-                       MPASS(link->l_prs_template.Type == ACPI_RESOURCE_TYPE_IRQ);
+                       KKASSERT(i < sc->pl_num_links);
+                       KKASSERT(link->l_prs_template.Type == ACPI_RESOURCE_TYPE_IRQ);
                        newres = link->l_prs_template;
                        resptr = &newres;
                        resptr->Data.Irq.InterruptCount = 1;
@@ -762,8 +762,8 @@ acpi_pci_link_srs_from_crs(struct acpi_pci_link_softc *sc, ACPI_BUFFER *srsbuf)
                        i++;
                        break;
                case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
-                       MPASS(i < sc->pl_num_links);
-                       MPASS(link->l_prs_template.Type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ);
+                       KKASSERT(i < sc->pl_num_links);
+                       KKASSERT(link->l_prs_template.Type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ);
                        newres = link->l_prs_template;
                        resptr = &newres;
                        resptr->Data.ExtendedIrq.InterruptCount = 1;
@@ -893,7 +893,7 @@ acpi_pci_link_route_irqs(device_t dev)
                switch (resource->Type) {
                case ACPI_RESOURCE_TYPE_IRQ:
                case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
-                       MPASS(i < sc->pl_num_links);
+                       KKASSERT(i < sc->pl_num_links);
 
                        /*
                         * Only configure the interrupt and update the
index f2dccc3..e1571da 100644 (file)
@@ -227,14 +227,6 @@ int        lockcountnb (struct lock *);
        SYSUNINIT(name##_lock_sysuninit, SI_SUB_DRIVERS, SI_ORDER_MIDDLE,       \
            lockuninit, (lock))
 
-/*
- * Helpful macros for quickly coming up with assertions with informative
- * panic messages.
- */
-#define MPASS(ex)               MPASS4(ex, #ex, __FILE__, __LINE__)
-#define MPASS4(ex, what, file, line)                                    \
-        KASSERT((ex), ("Assertion %s failed at %s:%d", what, file, line))
-
 #endif /* _KERNEL */
 #endif /* _KERNEL || _KERNEL_STRUCTURES */
 #endif /* _SYS_LOCK_H_ */