Module Name:    src
Committed By:   riastradh
Date:           Mon Aug 27 14:42:23 UTC 2018

Modified Files:
        src/sys/external/bsd/drm2/linux: linux_writecomb.c

Log Message:
KASSERT -> KASSERTMSG


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/linux/linux_writecomb.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/external/bsd/drm2/linux/linux_writecomb.c
diff -u src/sys/external/bsd/drm2/linux/linux_writecomb.c:1.7 src/sys/external/bsd/drm2/linux/linux_writecomb.c:1.8
--- src/sys/external/bsd/drm2/linux/linux_writecomb.c:1.7	Mon Aug 27 06:49:52 2018
+++ src/sys/external/bsd/drm2/linux/linux_writecomb.c	Mon Aug 27 14:42:23 2018
@@ -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 @@ fail1:	KASSERT(id < 0);
 	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 @@ arch_phys_wc_del(int id)
 		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

Reply via email to