aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-04-21 21:35:54 +0000
committerWarner Losh <imp@FreeBSD.org>2021-04-21 21:37:24 +0000
commit1eebd6158cccf12f3b057d6a1adf9d40ec59844c (patch)
treec9bf65d4a3a5b5c953c101531ee1ee19b79920a4
parent6a3a6fe34bf36b6e745b3e9ad1a991de057729c7 (diff)
downloadsrc-1eebd6158cccf12f3b057d6a1adf9d40ec59844c.tar.gz
src-1eebd6158cccf12f3b057d6a1adf9d40ec59844c.zip
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
-rw-r--r--sys/kern/subr_kobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c
index d001450cba6f..17d23336e333 100644
--- a/sys/kern/subr_kobj.c
+++ b/sys/kern/subr_kobj.c
@@ -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++;
}