From nobody Sun Dec 01 04:57:13 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 4Y1F5P4MBMz5gCjk; Sun, 01 Dec 2024 04:57:13 +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 4Y1F5P3PDkz49NW; Sun, 1 Dec 2024 04:57:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029033; 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=96Ua9PKI18USscJBoeSXTDGYCB9mnBCMjc4rYeXcHaI=; b=tVJQ/XLPRqK8JR0Tw7zh5thBhM6e9e7l/ZBb5PqzCd9s3yZO6Abn6xAkld7QhHF2j7seoA lXMlp/zPbRYvycA/VH75POgKJoOBlzaSUbhnIEVgXpYIRQOyv/nW17nXRTbPk0Ll1J/FVh Vn+GuT7EP7IxMKxinmMQQ4EsFcVGtOZ22S2mzAfLU62LvjC+Nv4UQMq2nFeWrzm4iT8H3Q S/jb8RIpJKgKn/m+UiwnJHqrNGw9i3Ut3fMlsRFFzpVI/lP0wn0B90HNNeVNLlTkI6JFWi cwYGYuCi32meniDLvD1pcGRcJMhkZUkYiNrW1XqPyvDpSMzVQ0iZlXxpt8KuXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029033; 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=96Ua9PKI18USscJBoeSXTDGYCB9mnBCMjc4rYeXcHaI=; b=mc1lny8z2gwh+N8Yh4EAPFmksI7y0OepsLgv/iVPHpgwnrkGBCeKC/NOvuLuZgHaVjT3Lp kafGc/BkfkT1i5Z7nwu54YJwHZGKXfnC8hVZHfPgD2SJDjz7rAhk4dD1zCKo3egiHACK8K 6YkdRUvqCpw6Fhv0AavQpW9PR6jT4DrJIceUel/Y78lpD+XK9joWK4HfiZClqhrShmdMkb tQhdebOWJCIPsGU5msbiMmaMjGTS92QbxEK1A9VGkC+0Vg4dAcM7YRXwyTfkHnezlW5CUx nVivAt/XDtJBEtMBI31LpIoIFN9cpPwR09A0rdhVy2KfuEl1CVBM2+XE1Ve+OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029033; a=rsa-sha256; cv=none; b=mq6YlVC6OWk1+lYJr3/x35VzdayRRK4rPuilmqIjvUvgLicOJvIbX6D0raFuC3OSoviYds LVI2kcDqx95MPt9WOdS85o0iShaQRDoQ4U8TuUoxMJ46ADxNPeH35Cdo4IW3r75VYIyVqw FrMefFSW4QeK3FshGow2iQaFK184lE6IwSGLr8j0geT3IcFprqXnwcRv8174OF9XzBGj8y mTT+9Z4qWrrtpCTACqYUhLo+OkrMq8IUGZ8w02GDBVVIhQj3yXY8HdqJuTqKkCHfhet0rS oGziEA9h1Jgc0/Z7lwgGzCFWZeXo5i233lFo+QICV9lTuX1FsP0/KYehsPUSJg== 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 4Y1F5P30DTzdwZ; Sun, 1 Dec 2024 04:57:13 +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 4B14vD0A095321; Sun, 1 Dec 2024 04:57:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vDnH095318; Sun, 1 Dec 2024 04:57:13 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:13 GMT Message-Id: <202412010457.4B14vDnH095318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 047c1f1b08e7 - stable/14 - isa: Use a bus_child_deleted method to free ivars for children 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 047c1f1b08e7c147d1155721eeb068be996d7b91 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=047c1f1b08e7c147d1155721eeb068be996d7b91 commit 047c1f1b08e7c147d1155721eeb068be996d7b91 Author: John Baldwin AuthorDate: 2024-11-01 14:09:31 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:06 +0000 isa: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47368 (cherry picked from commit c8fa54882226d89e987fb26b94979aed85a3bd9a) --- sys/isa/isa_common.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index b6f99a0922e5..511c85b05366 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -622,6 +622,12 @@ isa_add_child(device_t dev, u_int order, const char *name, int unit) return (child); } +static void +isa_child_deleted(device_t dev, device_t child) +{ + free(device_get_ivars(child), M_ISADEV); +} + static int isa_print_all_resources(device_t dev) { @@ -1060,6 +1066,7 @@ static device_method_t isa_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, isa_add_child), + DEVMETHOD(bus_child_deleted, isa_child_deleted), DEVMETHOD(bus_print_child, isa_print_child), DEVMETHOD(bus_probe_nomatch, isa_probe_nomatch), DEVMETHOD(bus_read_ivar, isa_read_ivar),