From nobody Sun Dec 01 04:58:02 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 4Y1F6L6hhnz5gDFr; Sun, 01 Dec 2024 04:58:02 +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 4Y1F6L2TTRz4Cth; Sun, 1 Dec 2024 04:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029082; 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=+m7LvyfxBTJ1Zvra/mF8QvTM2NNue1AAGqgKuUe/Kks=; b=WBhxUEdj+1rZ22F3WNrRa7GCEJ8dgHG6pSI5GxI+LeCdSwEeJoWGmiD6GJcGu8uq3xgmxr bmdQb55ssrwwW+POr6qWH6gRy3FA9h0f0thbvFPgw8qE+cmEI892r5oCsVBt9TxS1QPKOO jjD/Ao/0sEzfgUKNaG3Uzfwwg1oSSnDhipCxY8nT5YrHzKfbpy4dmFhGekeGzx6OIIk/7X B385i9LhGlPMbXOPrbdCXAI+hyTWepPPLnfd3XtTLumdmEHkT/w1ajjiL7OLIDuUvnK+ZA BUgt7WMeIWUpcran+4bepgSM7G+D8E8CzdIznwSDB8WbkrKTCH5JpzaL++wNAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029082; 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=+m7LvyfxBTJ1Zvra/mF8QvTM2NNue1AAGqgKuUe/Kks=; b=oCvmzXl3PheJL0MqqwVMNjCZZQkqI7XAgfwuaJI1Xx8Mg48iOCKN9rTHcWJmDmc1shYega Qoq7lxpY43U4XVf6N4RF7gOj6I6c8uZNbNWfGx7wON3t1M6w8RXBRSKDti5PRTkNr7TgfG kSoXPRZhcrXtYau+SsoEGHXCElbZViJAzLg2UplMFwb7jFpYwLSWqEzvH96FqRxwRzTC56 iclGdF8sDwxZRlTzUOuQv1dU2YM45YXOTX24Br/3grih3+WVDmDiIQfhMYJMrDMbqm0u60 UwjVHRw2imW4cavEihAGJXs9VHzJmzm4Da+yQOe0MNbKhf87bBfRC+NK+vcpWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029082; a=rsa-sha256; cv=none; b=IBcOhbT5cinwUWlfL55iwAifzZu3x6SmwzJ5TDE8OBTz3pDdDtZLy0glUZJyuDX8fxhW12 ZG2czz6K36URV42lnmpPSYDFC8HFVqzuIJ8nXG0HFgu5AdIqaIh6Y2Ws3u7xBD5OnByYMO 2oAFMLVaXcPc/MXT4+C7r7NHZ9zcw7jy5PXCAuxi7CwqSXq1EsPTsJ7WXbJtcecaVudz8Z 9NZ6l4PsJM1UheTIPHJLxczdjHM/eqeqvfaU0PQ4PRk+DPyowtILpldG7/mbno+xyqPRqS lDfjnLAAn/cXWUX2i5Wm5Whe0L5P5yu5sxOPTQnu//6B8V/Gcj9vOhiKLfeOXw== 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 4Y1F6L22HPzfQy; Sun, 1 Dec 2024 04:58:02 +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 4B14w2tX097677; Sun, 1 Dec 2024 04:58:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14w2Em097674; Sun, 1 Dec 2024 04:58:02 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:58:02 GMT Message-Id: <202412010458.4B14w2Em097674@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: b669f1b35c79 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: b669f1b35c793f3671c65618d13590b2fd855614 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b669f1b35c793f3671c65618d13590b2fd855614 commit b669f1b35c793f3671c65618d13590b2fd855614 Author: John Baldwin AuthorDate: 2024-11-01 14:09:31 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:43:46 +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 856551a7abba..29b48375257c 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -626,6 +626,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) { @@ -1068,6 +1074,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),