From nobody Fri Dec 06 22:29:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Y4mC60S3pz5g18Y; Fri, 06 Dec 2024 22:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y4mC55QfBz47h8; Fri, 6 Dec 2024 22:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733524161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVQ36dyf9iXip8ZkJg3czGkzbv6PnOVe++57BF9BFJE=; b=bzi0yZpmplfdlSrTYMdvOoxVZuCKeYWxFWAwuC+uW1QX/35kJCg/AKlS7H4c/o9NKFJT8+ Cp9LVt2/iGH8lUQUEamJpk6k26T3j8qP5E7tO8WTl8gHC7NxLNnV691+roV1uYDIuyscKg Lacw26b73n/t59u1j7Bv5eUllh1MKtNSFosBU6ENGGhHFdbqe2oPIOP/ALgZBBAB8yoLNC d01VgOdJSMV9Lkmn10omBRgXrcX6xqGDTU16q+NSejD0Z1RcgtJfesgdZaKlofqzH9T8g8 /BBAmRARIUcVA1YWyr1gmZrAbtXqsZRy6c4UCN9qIcsXZdEV4/QoDSBUAnFmJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733524161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cVQ36dyf9iXip8ZkJg3czGkzbv6PnOVe++57BF9BFJE=; b=rT0waLKPvQwCzR/c6bJ67NDTA++7ccQMzLTi5VI6XgzGw07DfhFC3FtvuygZHZLE8PlzAt tv0hcfGrIliXkx8DD2NN7c8BbvI9+mCVwqu9Q07xge84P/RCIcXn9xJudPujSJemxiyEgY DKczENhZS3Cp7f6SE+RSJ/bzR3Vj7tEN5Zlv2anPNbVI1vLV5YQAjw/IWE5i3ToT7nOP3a 3+ECM2tcRLr+w8C1RHrT8t6YPecekkuVuR101F4/NhIrSFCP9//HP39whIBL0oGPmtOek3 LMtmXOQswd7fHUFsRriByuWBwBvsXmWjcveZ55NilBgtL9wXYwMfQuIlhe+HZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733524161; a=rsa-sha256; cv=none; b=RQgMdMFaQ7cdLiMI+//IJaRv7RwqSi66ER7gJ/+l30up7AUtzybtM4lfYtd+Ifex5JPlNq 3bNcR4LHPSem665WQLE9bhiunWEYR1/AARq9tsDxojuzseqMIcJObMEXThBI3qiDjMTv7r jQemzltdpOwL5iJZ/3y3/xn4F0fJHsDUnNPeq3uMjNcHRxvQm1MzyHwvocoFY1RnTI2kd1 tpbYaQ0lDFR9PVaAxxyiEX1DUYVkuxkXF6EuZa/63jhEIFjEpAGfZjeHNpzW9UFRYWjKr5 HG2ArHbcP0x1btNCPPMM+Uoehlmq775cxhsER60exucFfXqDAiZk29l4ih3kXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Y4mC54GxPzwrL; Fri, 6 Dec 2024 22:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B6MTLgP072430; Fri, 6 Dec 2024 22:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B6MTLIq072427; Fri, 6 Dec 2024 22:29:21 GMT (envelope-from git) Date: Fri, 6 Dec 2024 22:29:21 GMT Message-Id: <202412062229.4B6MTLIq072427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 34f5de82e8fc - main - bus_delayed_attach_children: Switch return type to void List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34f5de82e8fcf0ab335a708a9141a5f4240a4c64 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=34f5de82e8fcf0ab335a708a9141a5f4240a4c64 commit 34f5de82e8fcf0ab335a708a9141a5f4240a4c64 Author: John Baldwin AuthorDate: 2024-12-06 22:27:14 +0000 Commit: John Baldwin CommitDate: 2024-12-06 22:27:14 +0000 bus_delayed_attach_children: Switch return type to void This function never fails similar to bus_attach_children. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47677 --- sys/arm/broadcom/bcm2835/bcm2835_bsc.c | 3 ++- sys/arm/freescale/imx/imx_i2c.c | 3 ++- sys/arm/freescale/imx/imx_spi.c | 3 ++- sys/arm/mv/a37x0_spi.c | 3 ++- sys/arm/mv/mv_spi.c | 3 ++- sys/arm/ti/ti_i2c.c | 2 +- sys/dev/glxiic/glxiic.c | 2 +- sys/dev/hid/hidbus.c | 11 ++++------- sys/dev/ichsmb/ichsmb.c | 3 ++- sys/dev/iicbus/controller/cadence/cdnc_i2c.c | 3 ++- sys/dev/intel/spi.c | 3 ++- sys/dev/ow/owc_gpiobus.c | 3 ++- sys/kern/subr_bus.c | 4 +--- sys/sys/bus.h | 2 +- 14 files changed, 26 insertions(+), 22 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c index 6a9853a7b4f9..c7de4df0e8fb 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c @@ -349,7 +349,8 @@ bcm_bsc_attach(device_t dev) } /* Probe and attach the iicbus when interrupts are available. */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c index d8d7514c8c4b..c1d5c8c974a8 100644 --- a/sys/arm/freescale/imx/imx_i2c.c +++ b/sys/arm/freescale/imx/imx_i2c.c @@ -469,7 +469,8 @@ no_recovery: /* We don't do a hardware reset here because iicbus_attach() does it. */ /* Probe and attach the iicbus when interrupts are available. */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/arm/freescale/imx/imx_spi.c b/sys/arm/freescale/imx/imx_spi.c index 388b25b7ec28..53d9f739b97c 100644 --- a/sys/arm/freescale/imx/imx_spi.c +++ b/sys/arm/freescale/imx/imx_spi.c @@ -564,7 +564,8 @@ spi_attach(device_t dev) * their attach. We can't do IO until timers and interrupts are working. */ sc->spibus = device_add_child(dev, "spibus", DEVICE_UNIT_ANY); - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/arm/mv/a37x0_spi.c b/sys/arm/mv/a37x0_spi.c index 4bcbbc503218..bc47da2f3e6e 100644 --- a/sys/arm/mv/a37x0_spi.c +++ b/sys/arm/mv/a37x0_spi.c @@ -217,7 +217,8 @@ a37x0_spi_attach(device_t dev) device_add_child(dev, "spibus", DEVICE_UNIT_ANY); /* Probe and attach the spibus when interrupts are available. */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/arm/mv/mv_spi.c b/sys/arm/mv/mv_spi.c index 621594624b7b..1f9c8ebf2380 100644 --- a/sys/arm/mv/mv_spi.c +++ b/sys/arm/mv/mv_spi.c @@ -171,7 +171,8 @@ mv_spi_attach(device_t dev) device_add_child(dev, "spibus", DEVICE_UNIT_ANY); /* Probe and attach the spibus when interrupts are available. */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/arm/ti/ti_i2c.c b/sys/arm/ti/ti_i2c.c index 527c8cbd8ee3..a6c397a87e8b 100644 --- a/sys/arm/ti/ti_i2c.c +++ b/sys/arm/ti/ti_i2c.c @@ -889,7 +889,7 @@ ti_i2c_attach(device_t dev) } /* Probe and attach the iicbus when interrupts are available. */ - err = bus_delayed_attach_children(dev); + bus_delayed_attach_children(dev); out: if (err) { diff --git a/sys/dev/glxiic/glxiic.c b/sys/dev/glxiic/glxiic.c index 16ed337c543b..5dfea9acbe4a 100644 --- a/sys/dev/glxiic/glxiic.c +++ b/sys/dev/glxiic/glxiic.c @@ -408,7 +408,7 @@ glxiic_attach(device_t dev) glxiic_smb_enable(sc, IIC_FASTEST, 0); /* Probe and attach the iicbus when interrupts are available. */ - error = bus_delayed_attach_children(dev); + bus_delayed_attach_children(dev); out: if (error != 0) { diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index 8e55d65f308b..9b8b7fed8887 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -272,15 +272,12 @@ hidbus_attach_children(device_t dev) if (sc->nest != 0) return (0); - if (hid_is_keyboard(sc->rdesc.data, sc->rdesc.len) != 0) { + if (hid_is_keyboard(sc->rdesc.data, sc->rdesc.len) != 0) bus_attach_children(dev); - error = 0; - } else - error = bus_delayed_attach_children(dev); - if (error != 0) - device_printf(dev, "failed to attach child: error %d\n", error); + else + bus_delayed_attach_children(dev); - return (error); + return (0); } static int diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index 94fc03d2bc67..063fbf66a75a 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -130,7 +130,8 @@ ichsmb_attach(device_t dev) } /* Attach children when interrupts are available */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); fail: mtx_destroy(&sc->mutex); return (error); diff --git a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c index 61f4975c10de..3bed24c36070 100644 --- a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c +++ b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c @@ -617,7 +617,8 @@ cdnc_i2c_attach(device_t dev) cdnc_i2c_add_sysctls(dev); /* Probe and attach iicbus when interrupts work. */ - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c index 1a52300ea785..4c45ef7863a7 100644 --- a/sys/dev/intel/spi.c +++ b/sys/dev/intel/spi.c @@ -529,7 +529,8 @@ intelspi_attach(device_t dev) device_add_child(dev, "spibus", DEVICE_UNIT_ANY); - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); error: INTELSPI_LOCK_DESTROY(sc); diff --git a/sys/dev/ow/owc_gpiobus.c b/sys/dev/ow/owc_gpiobus.c index 2d37b71aee2d..231902e02536 100644 --- a/sys/dev/ow/owc_gpiobus.c +++ b/sys/dev/ow/owc_gpiobus.c @@ -134,7 +134,8 @@ owc_gpiobus_attach(device_t dev) * the system timecounter (which initializes after device attachments). */ device_add_child(sc->sc_dev, "ow", DEVICE_UNIT_ANY); - return (bus_delayed_attach_children(dev)); + bus_delayed_attach_children(dev); + return (0); } static int diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 945d91d951d6..1d04ea496f08 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3485,13 +3485,11 @@ bus_attach_children(device_t dev) * attach until after interrupts and/or timers are running. This function * delays their attach until interrupts and timers are enabled. */ -int +void bus_delayed_attach_children(device_t dev) { /* Probe and attach the bus children when interrupts are available */ config_intrhook_oneshot((ich_func_t)bus_attach_children, dev); - - return (0); } /** diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 38834bcf5a8e..01031ae3ef28 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -595,9 +595,9 @@ int bus_child_pnpinfo(device_t child, struct sbuf *sb); int bus_child_location(device_t child, struct sbuf *sb); void bus_attach_children(device_t dev); +void bus_delayed_attach_children(device_t bus); int bus_detach_children(device_t dev); void bus_enumerate_hinted_children(device_t bus); -int bus_delayed_attach_children(device_t bus); void bus_identify_children(device_t dev); static __inline struct resource *