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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to