Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include Move WARN and WARN_ON...
details: https://anonhg.NetBSD.org/src/rev/5fcd0f90839a
branches: riastradh-drm2
changeset: 788126:5fcd0f90839a
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:21:43 2013 +0000
description:
Move WARN and WARN_ON to <asm/bug.h> and add BUG_ON.
diffstat:
sys/external/bsd/drm2/include/asm/bug.h | 50 ++++++++++++++++++++++++++++
sys/external/bsd/drm2/include/linux/kernel.h | 12 +------
2 files changed, 51 insertions(+), 11 deletions(-)
diffs (80 lines):
diff -r 403840adbe9b -r 5fcd0f90839a sys/external/bsd/drm2/include/asm/bug.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/drm2/include/asm/bug.h Wed Jul 24 02:21:43 2013 +0000
@@ -0,0 +1,50 @@
+/* $NetBSD: bug.h,v 1.1.2.1 2013/07/24 02:21:43 riastradh Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Taylor R. Campbell.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _ASM_BUG_H_
+#define _ASM_BUG_H_
+
+#include <sys/cdefs.h>
+#include <sys/systm.h>
+
+#define BUG_ON(CONDITION) KASSERT(!(CONDITION))
+
+/* XXX Rate limit? */
+#define WARN(CONDITION, FMT, ...) do \
+{ \
+ if (CONDITION) \
+ printf("warning: %s:%d: " FMT, __FILE__, __LINE__, \
+ ##__VA_ARGS__); \
+} while (0)
+
+#define WARN_ON(CONDITION) WARN(CONDITION, "%s\n", #CONDITION)
+
+#endif /* _LINUX_KERNEL_H_ */
diff -r 403840adbe9b -r 5fcd0f90839a sys/external/bsd/drm2/include/linux/kernel.h
--- a/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 02:21:22 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/kernel.h Wed Jul 24 02:21:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.h,v 1.1.2.7 2013/07/24 02:14:10 riastradh Exp $ */
+/* $NetBSD: kernel.h,v 1.1.2.8 2013/07/24 02:21:43 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -43,16 +43,6 @@
#define ARRAY_SIZE(ARRAY) __arraycount(ARRAY)
-/* XXX Rate limit? */
-#define WARN(CONDITION, FMT, ...) do \
-{ \
- if (CONDITION) \
- printf("warning: %s:%d: " FMT, __FILE__, __LINE__, \
- ##__VA_ARGS__); \
-} while (0)
-
-#define WARN_ON(CONDITION) WARN(CONDITION, "%s\n", #CONDITION)
-
#define swap(X, Y) do \
{ \
/* XXX Kludge for type-safety. */ \
Home |
Main Index |
Thread Index |
Old Index