Messages in this thread | | | Date | Thu, 10 Jan 2019 16:55:09 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH v5 11/15] locking/lockdep: Check data structure consistency |
| |
On Mon, Dec 17, 2018 at 01:29:58PM -0800, Bart Van Assche wrote: > + /* Check whether all classes occur in a lock list. */ > + for (i = 0; i < ARRAY_SIZE(lock_classes); i++) { > + class = &lock_classes[i]; > + if (!in_list(&class->lock_entry, &all_lock_classes) && > + !in_list(&class->lock_entry, &free_lock_classes) && > + !in_any_zapped_class_list(class)) { > + printk(KERN_INFO "class %px/%s is not in any class list\n", > + class, class->name ? : "(?)"); > + return false; > + return false;
I'm thinking just one return statement will suffice ;-)
> + } > + }
| |