git: dd6bb9abf075 - main - LinuxKPI: Use SYSCTL_FOREACH()

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Wed, 28 Sep 2022 12:00:31 UTC
The branch main has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=dd6bb9abf075fd3a14956f61559a7e90bb2f26d9

commit dd6bb9abf075fd3a14956f61559a7e90bb2f26d9
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-09-28 11:42:32 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-09-28 11:59:55 +0000

    LinuxKPI: Use SYSCTL_FOREACH()
    
    Differential Revision:  https://reviews.freebsd.org/D36748
    MFC after:      1 week
    Sponsored by:   NVIDIA Networking
---
 sys/compat/linuxkpi/common/include/linux/sysfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h
index 881a72e62ed9..e6b8ad210f16 100644
--- a/sys/compat/linuxkpi/common/include/linux/sysfs.h
+++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h
@@ -246,7 +246,7 @@ sysfs_unmerge_group(struct kobject *kobj, const struct attribute_group *grp)
 	struct attribute **attr;
 	struct sysctl_oid *oidp;
 
-	RB_FOREACH(oidp, sysctl_oid_list, SYSCTL_CHILDREN(kobj->oidp)) {
+	SYSCTL_FOREACH(oidp, SYSCTL_CHILDREN(kobj->oidp)) {
 		if (strcmp(oidp->oid_name, grp->name) != 0)
 			continue;
 		for (attr = grp->attrs; *attr != NULL; attr++) {