From owner-svn-src-all@FreeBSD.ORG Tue Nov 13 20:59:52 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D7E35A88; Tue, 13 Nov 2012 20:59:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 6A20C8FC12; Tue, 13 Nov 2012 20:59:51 +0000 (UTC) Received: from c122-106-175-26.carlnfd1.nsw.optusnet.com.au (c122-106-175-26.carlnfd1.nsw.optusnet.com.au [122.106.175.26]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id qADKxmOX004463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Nov 2012 07:59:50 +1100 Date: Wed, 14 Nov 2012 07:59:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Attilio Rao Subject: Re: svn commit: r242988 - head/sys/sys In-Reply-To: <201211131824.qADIOmqx095958@svn.freebsd.org> Message-ID: <20121114074101.S3274@besplex.bde.org> References: <201211131824.qADIOmqx095958@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-Cloudmark-Score: 0 X-Optus-Cloudmark-Analysis: v=2.0 cv=I9g936cg c=1 sm=1 a=YwJJsOro7M4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=FSHVhTTuonsA:10 a=JmXgxbBXa1p9hI0StDUA:9 a=CjuIK1q_8ugA:10 a=bxQHXO5Py4tHmhUgaywp5w==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 20:59:53 -0000 > Log: > Remove unused/obsolete macros. Many more style bugs to fix are visible in the patch: > Modified: head/sys/sys/lock.h > ============================================================================== > --- head/sys/sys/lock.h Tue Nov 13 17:16:03 2012 (r242987) > +++ head/sys/sys/lock.h Tue Nov 13 18:24:47 2012 (r242988) > @@ -304,16 +304,5 @@ void witness_thread_exit(struct thread * > #define WITNESS_LINE(lock) (0) 1. space instead of tab before the value 2. bogus parentheses around a single token. All the nearby stub macros have similar low quality. Bugs in the others include: A. gross indentation for (void)0 B. missing parentheses around (void)0 C. non-bug: some plain 0's really are plain and are preceded by a tab D. space instead of tab in the line before the above E. these 2 lines with their space for indentation don't line up the value with the grossly indented values or the plain 0 values. > #endif /* WITNESS */ 3. tab before comment on ifdef. > > -/* > - * Helper macros to allow developers to add explicit lock order checks > - * wherever they please without having to actually grab a lock to do so. > - */ > -#define witness_check(l) \ > - WITNESS_CHECKORDER(&(l)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \ > - LOCK_LINE, NULL) > - > -#define witness_check_shared(l) \ > - WITNESS_CHECKORDER(&(l)->lock_object, 0, LOCK_FILE, LOCK_LINE, NULL) > - > #endif /* _KERNEL */ > #endif /* _SYS_LOCK_H_ */ > 4. 2 more instances of tab before comment on endif. 5. no blank line before the final endif to match the one for its bracketing ifdef (or rather the define for this. This blank line is also needed to provide one after the _KERNEL endif, to match the one before the bracketing kernel ifdef. 6. backwards comment on final endif. The WITNESS #else and #endif are also missing blank lines to match the ones for the WITNESS #ifdef. The density of style bugs in sys/lock.h is otherwise not very high, exceot for unsorted prototypes and macros. Bruce