aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-07-21 07:19:07 -0400
committerIngo Molnar <mingo@elte.hu>2009-08-02 09:41:32 -0400
commit98c33eddaf41d225d99b40f9eedbd0fac4c08c05 (patch)
tree554181729c032b801d567b8559d68ab66c23ebf3 /kernel/lockdep.c
parent4f84f4330a11b9eb828bf5af557f4c79c64614a3 (diff)
lockdep: Fix style nits
fixes a few comments and whitespaces that annoyed me. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 2f0970297e30..4b6cebe8ab31 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -843,15 +843,18 @@ static int add_lock_to_list(struct lock_class *class, struct lock_class *this,
843 return 1; 843 return 1;
844} 844}
845 845
846/*For good efficiency of modular, we use power of 2*/ 846/*
847 * For good efficiency of modular, we use power of 2
848 */
847#define MAX_CIRCULAR_QUEUE_SIZE 4096UL 849#define MAX_CIRCULAR_QUEUE_SIZE 4096UL
848#define CQ_MASK (MAX_CIRCULAR_QUEUE_SIZE-1) 850#define CQ_MASK (MAX_CIRCULAR_QUEUE_SIZE-1)
849 851
850/* The circular_queue and helpers is used to implement the 852/*
853 * The circular_queue and helpers is used to implement the
851 * breadth-first search(BFS)algorithem, by which we can build 854 * breadth-first search(BFS)algorithem, by which we can build
852 * the shortest path from the next lock to be acquired to the 855 * the shortest path from the next lock to be acquired to the
853 * previous held lock if there is a circular between them. 856 * previous held lock if there is a circular between them.
854 * */ 857 */
855struct circular_queue { 858struct circular_queue {
856 unsigned long element[MAX_CIRCULAR_QUEUE_SIZE]; 859 unsigned long element[MAX_CIRCULAR_QUEUE_SIZE];
857 unsigned int front, rear; 860 unsigned int front, rear;
@@ -907,6 +910,7 @@ static inline void mark_lock_accessed(struct lock_list *lock,
907 struct lock_list *parent) 910 struct lock_list *parent)
908{ 911{
909 unsigned long nr; 912 unsigned long nr;
913
910 nr = lock - list_entries; 914 nr = lock - list_entries;
911 WARN_ON(nr >= nr_list_entries); 915 WARN_ON(nr >= nr_list_entries);
912 lock->parent = parent; 916 lock->parent = parent;
@@ -916,6 +920,7 @@ static inline void mark_lock_accessed(struct lock_list *lock,
916static inline unsigned long lock_accessed(struct lock_list *lock) 920static inline unsigned long lock_accessed(struct lock_list *lock)
917{ 921{
918 unsigned long nr; 922 unsigned long nr;
923
919 nr = lock - list_entries; 924 nr = lock - list_entries;
920 WARN_ON(nr >= nr_list_entries); 925 WARN_ON(nr >= nr_list_entries);
921 return test_bit(nr, bfs_accessed); 926 return test_bit(nr, bfs_accessed);