Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/linux KASSERT -> KASSERTMSG



details:   https://anonhg.NetBSD.org/src/rev/8271f305bc7b
branches:  trunk
changeset: 835377:8271f305bc7b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:42:23 2018 +0000

description:
KASSERT -> KASSERTMSG

diffstat:

 sys/external/bsd/drm2/linux/linux_writecomb.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (40 lines):

diff -r 45f47e1f437f -r 8271f305bc7b sys/external/bsd/drm2/linux/linux_writecomb.c
--- a/sys/external/bsd/drm2/linux/linux_writecomb.c     Mon Aug 27 14:42:07 2018 +0000
+++ b/sys/external/bsd/drm2/linux/linux_writecomb.c     Mon Aug 27 14:42:23 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_writecomb.c,v 1.7 2018/08/27 06:49:52 riastradh Exp $    */
+/*     $NetBSD: linux_writecomb.c,v 1.8 2018/08/27 14:42:23 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_writecomb.c,v 1.7 2018/08/27 06:49:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_writecomb.c,v 1.8 2018/08/27 14:42:23 riastradh Exp $");
 
 #if defined(__i386__) || defined(__x86_64__)
 #define HAS_MTRR 1
@@ -112,8 +112,8 @@
        mtrr->flags = 0;
        /* XXX errno NetBSD->Linux */
        ret = -mtrr_set(mtrr, &n, NULL, MTRR_GETSET_KERNEL);
-       KASSERT(ret == 0);
-       KASSERT(n == 1);
+       KASSERTMSG(ret == 0, "mtrr_set failed to delete: %d", -ret);
+       KASSERTMSG(n == 1, "mtrr_set returned wrong number: %d", n);
        ret = id;
 fail0: KASSERT(ret < 0);
        kmem_free(mtrr, sizeof(*mtrr));
@@ -143,8 +143,8 @@
                mtrr->flags = 0;
                /* XXX errno NetBSD->Linux */
                ret = -mtrr_set(mtrr, &n, NULL, MTRR_GETSET_KERNEL);
-               KASSERT(ret == 0);
-               KASSERT(n == 1);
+               KASSERTMSG(ret == 0, "mtrr_set failed to delete: %d", -ret);
+               KASSERTMSG(n == 1, "mtrr_set returned wrong number: %d", n);
                kmem_free(mtrr, sizeof(*mtrr));
        }
 #endif



Home | Main Index | Thread Index | Old Index