git: 00b3cde596dd - main - new-bus: Add a comment for bus_generic_get_domain

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 24 Nov 2023 18:34:58 UTC
The branch main has been updated by jhb:

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

commit 00b3cde596dd3945d56aa12f2a4957b2910e1ee3
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-11-24 18:33:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-11-24 18:33:57 +0000

    new-bus: Add a comment for bus_generic_get_domain
---
 sys/kern/subr_bus.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index 9e191f4c3a4f..1c6710dbbb3c 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -4358,6 +4358,13 @@ bus_generic_child_present(device_t dev, device_t child)
 	return (BUS_CHILD_PRESENT(device_get_parent(dev), dev));
 }
 
+/**
+ * @brief Helper function for implementing BUS_GET_DOMAIN().
+ *
+ * This simple implementation of BUS_GET_DOMAIN() calls the
+ * BUS_GET_DOMAIN() method of the parent of @p dev.  If @p dev
+ * does not have a parent, the function fails with ENOENT.
+ */
 int
 bus_generic_get_domain(device_t dev, device_t child, int *domain)
 {