diff options
Diffstat (limited to 'lib/debugobjects.c')
| -rw-r--r-- | lib/debugobjects.c | 21 | 
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c index d11808ca4bc4..37061ede8b81 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -109,11 +109,10 @@ static void fill_pool(void)   */  static struct debug_obj *lookup_object(void *addr, struct debug_bucket *b)  { -	struct hlist_node *node;  	struct debug_obj *obj;  	int cnt = 0; -	hlist_for_each_entry(obj, node, &b->list, node) { +	hlist_for_each_entry(obj, &b->list, node) {  		cnt++;  		if (obj->object == addr)  			return obj; @@ -213,7 +212,7 @@ static void free_object(struct debug_obj *obj)  static void debug_objects_oom(void)  {  	struct debug_bucket *db = obj_hash; -	struct hlist_node *node, *tmp; +	struct hlist_node *tmp;  	HLIST_HEAD(freelist);  	struct debug_obj *obj;  	unsigned long flags; @@ -227,7 +226,7 @@ static void debug_objects_oom(void)  		raw_spin_unlock_irqrestore(&db->lock, flags);  		/* Now free them */ -		hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) { +		hlist_for_each_entry_safe(obj, tmp, &freelist, node) {  			hlist_del(&obj->node);  			free_object(obj);  		} @@ -658,7 +657,7 @@ debug_object_active_state(void *addr, struct debug_obj_descr *descr,  static void __debug_check_no_obj_freed(const void *address, unsigned long size)  {  	unsigned long flags, oaddr, saddr, eaddr, paddr, chunks; -	struct hlist_node *node, *tmp; +	struct hlist_node *tmp;  	HLIST_HEAD(freelist);  	struct debug_obj_descr *descr;  	enum debug_obj_state state; @@ -678,7 +677,7 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size)  repeat:  		cnt = 0;  		raw_spin_lock_irqsave(&db->lock, flags); -		hlist_for_each_entry_safe(obj, node, tmp, &db->list, node) { +		hlist_for_each_entry_safe(obj, tmp, &db->list, node) {  			cnt++;  			oaddr = (unsigned long) obj->object;  			if (oaddr < saddr || oaddr >= eaddr) @@ -702,7 +701,7 @@ repeat:  		raw_spin_unlock_irqrestore(&db->lock, flags);  		/* Now free them */ -		hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) { +		hlist_for_each_entry_safe(obj, tmp, &freelist, node) {  			hlist_del(&obj->node);  			free_object(obj);  		} @@ -1013,7 +1012,7 @@ void __init debug_objects_early_init(void)  static int __init debug_objects_replace_static_objects(void)  {  	struct debug_bucket *db = obj_hash; -	struct hlist_node *node, *tmp; +	struct hlist_node *tmp;  	struct debug_obj *obj, *new;  	HLIST_HEAD(objects);  	int i, cnt = 0; @@ -1033,7 +1032,7 @@ static int __init debug_objects_replace_static_objects(void)  	local_irq_disable();  	/* Remove the statically allocated objects from the pool */ -	hlist_for_each_entry_safe(obj, node, tmp, &obj_pool, node) +	hlist_for_each_entry_safe(obj, tmp, &obj_pool, node)  		hlist_del(&obj->node);  	/* Move the allocated objects to the pool */  	hlist_move_list(&objects, &obj_pool); @@ -1042,7 +1041,7 @@ static int __init debug_objects_replace_static_objects(void)  	for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {  		hlist_move_list(&db->list, &objects); -		hlist_for_each_entry(obj, node, &objects, node) { +		hlist_for_each_entry(obj, &objects, node) {  			new = hlist_entry(obj_pool.first, typeof(*obj), node);  			hlist_del(&new->node);  			/* copy object data */ @@ -1057,7 +1056,7 @@ static int __init debug_objects_replace_static_objects(void)  	       obj_pool_used);  	return 0;  free: -	hlist_for_each_entry_safe(obj, node, tmp, &objects, node) { +	hlist_for_each_entry_safe(obj, tmp, &objects, node) {  		hlist_del(&obj->node);  		kmem_cache_free(obj_cache, obj);  	}  | 
