svn commit: r190279 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sys

Marius Strobl marius at FreeBSD.org
Sun Mar 22 13:52:45 PDT 2009


Author: marius
Date: Sun Mar 22 20:52:43 2009
New Revision: 190279
URL: http://svn.freebsd.org/changeset/base/190279

Log:
  MFC: r188475
  
  o Introduce KOBJMETHOD_END for the end of the kobj list.
  o Fix a minor indentation problem.
  o Put in the extra-strict KOBJMETHOD define, but commented out since
    the tree isn't yet ready.
  
  Reviewed by:	(1) was posted to arch@ without objection (and 1 go for it)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/sys/kobj.h

Modified: stable/7/sys/sys/kobj.h
==============================================================================
--- stable/7/sys/sys/kobj.h	Sun Mar 22 20:50:45 2009	(r190278)
+++ stable/7/sys/sys/kobj.h	Sun Mar 22 20:52:43 2009	(r190279)
@@ -92,7 +92,17 @@ struct kobjop_desc {
 /*
  * Shorthand for constructing method tables.
  */
+#if 1
 #define KOBJMETHOD(NAME, FUNC) { &NAME##_desc, (kobjop_t) FUNC }
+#else /* notyet */
+#define KOBJMETHOD(NAME, FUNC) \
+{ &NAME##_desc, (kobjop_t) (FUNC != (NAME##_t *)NULL ? FUNC : NULL) }
+#endif
+
+/*
+ *
+ */
+#define KOBJMETHOD_END	{ NULL, NULL }
 
 /*
  * Declare a class (which should be defined in another file.
@@ -127,7 +137,7 @@ struct kobj_class classvar = {				\
 		       base1)				\
 							\
 static kobj_class_t name ## _baseclasses[] =		\
-	{ &base1, NULL };					\
+	{ &base1, NULL };				\
 struct kobj_class classvar = {				\
 	#name, methods, size, name ## _baseclasses	\
 }


More information about the svn-src-all mailing list