From owner-svn-src-head@FreeBSD.ORG Wed Feb 11 04:52:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2994106564A; Wed, 11 Feb 2009 04:52:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0B9E8FC12; Wed, 11 Feb 2009 04:52:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1B4qkSh014341; Wed, 11 Feb 2009 04:52:46 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1B4qkMS014340; Wed, 11 Feb 2009 04:52:46 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200902110452.n1B4qkMS014340@svn.freebsd.org> From: Warner Losh Date: Wed, 11 Feb 2009 04:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188475 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2009 04:52:47 -0000 Author: imp Date: Wed Feb 11 04:52:46 2009 New Revision: 188475 URL: http://svn.freebsd.org/changeset/base/188475 Log: 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: head/sys/sys/kobj.h Modified: head/sys/sys/kobj.h ============================================================================== --- head/sys/sys/kobj.h Wed Feb 11 00:23:56 2009 (r188474) +++ head/sys/sys/kobj.h Wed Feb 11 04:52:46 2009 (r188475) @@ -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 \ }