newbus: Optimize/Simplify kobj_class_compile_common a little

"i" is not used in this loop at all. There's no need to initialize and
increment it.

Reviewed by:		markj@
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D29898
This commit is contained in:
Warner Losh 2021-04-21 15:35:54 -06:00
parent 6a3a6fe34b
commit 1eebd6158c

View File

@ -112,7 +112,7 @@ kobj_class_compile_common(kobj_class_t cls, kobj_ops_t ops)
/*
* First register any methods which need it.
*/
for (i = 0, m = cls->methods; m->desc; i++, m++) {
for (m = cls->methods; m->desc; m++) {
if (m->desc->id == 0)
m->desc->id = kobj_next_id++;
}