Module Name: src Committed By: rmind Date: Sun Apr 25 15:39:41 UTC 2010
Modified Files: src/sys/arch/mips/mips: syscall.c src/sys/dev/ic: siisata.c src/sys/lib/libkern: libkern.h Log Message: Fix KASSERTMSG() to be consistent with KASSERT() logic, not inverted. Hi m...@! To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/mips/mips/syscall.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/siisata.c cvs rdiff -u -r1.93 -r1.94 src/sys/lib/libkern/libkern.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/syscall.c diff -u src/sys/arch/mips/mips/syscall.c:1.40 src/sys/arch/mips/mips/syscall.c:1.41 --- src/sys/arch/mips/mips/syscall.c:1.40 Mon Dec 14 18:39:19 2009 +++ src/sys/arch/mips/mips/syscall.c Sun Apr 25 15:39:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $ */ +/* $NetBSD: syscall.c,v 1.41 2010/04/25 15:39:41 rmind Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -107,7 +107,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.40 2009/12/14 18:39:19 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.41 2010/04/25 15:39:41 rmind Exp $"); #if defined(_KERNEL_OPT) #include "opt_sa.h" @@ -174,7 +174,9 @@ int code, error; #if defined(__mips_o32) const int abi = _MIPS_BSD_API_O32; - KASSERTMSG(p->p_md.md_abi != abi, ("pid %d(%p): md_abi(%d) != abi(%d)", p->p_pid, p, p->p_md.md_abi, abi)); + KASSERTMSG(p->p_md.md_abi == abi, + ("pid %d(%p): md_abi(%d) != abi(%d)", + p->p_pid, p, p->p_md.md_abi, abi)); size_t nregs = 4; #else const int abi = p->p_md.md_abi; Index: src/sys/dev/ic/siisata.c diff -u src/sys/dev/ic/siisata.c:1.10 src/sys/dev/ic/siisata.c:1.11 --- src/sys/dev/ic/siisata.c:1.10 Wed Apr 7 17:51:16 2010 +++ src/sys/dev/ic/siisata.c Sun Apr 25 15:39:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.10 2010/04/07 17:51:16 jakllsch Exp $ */ +/* $NetBSD: siisata.c,v 1.11 2010/04/25 15:39:41 rmind Exp $ */ /* from ahcisata_core.c */ @@ -79,7 +79,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.10 2010/04/07 17:51:16 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.11 2010/04/25 15:39:41 rmind Exp $"); #include <sys/types.h> #include <sys/malloc.h> @@ -1183,7 +1183,7 @@ sc = (struct siisata_softc *)schp->ata_channel.ch_atac; - KASSERTMSG(((schp->sch_active_slots & __BIT(slot)) == __BIT(slot)), + KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != __BIT(slot), ("%s: trying to activate active slot %d", SIISATANAME(sc), slot)); SIISATA_PRB_SYNC(sc, schp, slot, BUS_DMASYNC_PREWRITE); @@ -1205,7 +1205,7 @@ sc = (struct siisata_softc *)schp->ata_channel.ch_atac; - KASSERTMSG(((schp->sch_active_slots & __BIT(slot)) == 0), + KASSERTMSG((schp->sch_active_slots & __BIT(slot)) != 0, ("%s: trying to deactivate inactive slot %d", SIISATANAME(sc), slot)); Index: src/sys/lib/libkern/libkern.h diff -u src/sys/lib/libkern/libkern.h:1.93 src/sys/lib/libkern/libkern.h:1.94 --- src/sys/lib/libkern/libkern.h:1.93 Tue Jan 19 22:28:30 2010 +++ src/sys/lib/libkern/libkern.h Sun Apr 25 15:39:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: libkern.h,v 1.93 2010/01/19 22:28:30 pooka Exp $ */ +/* $NetBSD: libkern.h,v 1.94 2010/04/25 15:39:41 rmind Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -208,7 +208,7 @@ #else /* DIAGNOSTIC */ #define _DIAGASSERT(a) assert(a) #define KASSERTMSG(e, msg) do { \ - if (__predict_false((e))) \ + if (__predict_false(!(e))) \ panic msg; \ } while (/*CONSTCOND*/ 0) #ifdef __STDC__