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/33250c3d96bf
branches:  trunk
changeset: 366296:33250c3d96bf
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 30efe86719a0 -r 33250c3d96bf 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