From nobody Fri Nov 01 14:13:06 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 4Xg2rg3K0vz5bpsC; Fri, 01 Nov 2024 14:13:07 +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 4Xg2rf53Tfz4bT5; Fri, 1 Nov 2024 14:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730470386; 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=6MpE3H70D71Ap0/DkjLy8ARiiHoq5RSnjEWTASew8DI=; b=pYBN3aLxaLfUdBUv1vJqmWtn0cTLFy5rrFpXShJmfQoC2W2+jB6awKeJk2nDB4Zewee7cU LtghsuTwRWyekMGKzh26IRwRxtdy34lj4qZQUNyWk1+NCzJd+mN6G7nQBqYkuWv5GBwqlR yKUfAg+i54V7ykhieRXaw5Yl2S7j6i53NBZM9j2RShzR7nsbxUptO6cSqGyReusn9eJdNF xpye6eje/jTLO/uEal7TBCY+mlI/FhWmdN2IbaN9bSCbHsqM650nEJ+jKjqnkfxrl9o5Rp CrTjS3YXkTsrCB5g0XrIF8OwQ9ticdIvWgbkUBR5FhDREc3YWwb3c+3lffWpXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730470386; 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=6MpE3H70D71Ap0/DkjLy8ARiiHoq5RSnjEWTASew8DI=; b=WMNURpn6EhM4gHhQo22riqHz9HHzejAvKuyb1QcsdFnaeX7sRTbst1VhiUT0ex2U0AFRQ2 3iIlNCMtkyvqxhCJ4CfG/pTIABsNAX99IUk/5g1XL9POibENkSU15j7sKL79PX574XDNK9 z0ZC5EsAWagCv9dyhTmB/q6qpHjEK8OIXTVgLXM/ZXAv0RDgY0O5hRAhLj+Y4lc81myiHE H6tmqfIwCd2A9Kcw1LC9BOuI+eaIEGrRw1wA46hA+Fck1kOorG7MG3dq38WFOF/rIHvjmj g1jPP1UadASqV4zBKwI4GzVKzJFlGnYqS96b56Zumk9P8SV4dZRUX1W0jRaEIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730470386; a=rsa-sha256; cv=none; b=qDj3nliJDL8Z5csYqnHYTeBbIuTgtKD5M7r5T18M1UyGWvrsc/FwS+kl5Lx/OKLZMlDnjC tCeYUX4ig/g9N9zldnqqXJsD1niKe0el1lJLjEo0VLd8GQlkpARSqEAJqaMBmdwQ9l+z8t /4UYIxrwGVz+SzxEJFga7AP2hfCUuYDJcwsSkD1Bu1cr3zOuTOIDAC+/otv5Doss+jnhir m8CcjXdpxC3/VS0sHOQLQDC7BaUQIYlAxfcuQLmbIbncvbkG252B5bsNt06/VfrOCdJAZM gdtjQni9X+1GN65zB7thTYDM8RqylrCefazLiVNYtE9a9Zz+GPf6xiSYPpQE1A== 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 4Xg2rf4XVqzNlm; Fri, 1 Nov 2024 14:13:06 +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 4A1ED6x5059549; Fri, 1 Nov 2024 14:13:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A1ED6a6059546; Fri, 1 Nov 2024 14:13:06 GMT (envelope-from git) Date: Fri, 1 Nov 2024 14:13:06 GMT Message-Id: <202411011413.4A1ED6a6059546@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: c8fa54882226 - main - 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/main X-Git-Reftype: branch X-Git-Commit: c8fa54882226d89e987fb26b94979aed85a3bd9a Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c8fa54882226d89e987fb26b94979aed85a3bd9a commit c8fa54882226d89e987fb26b94979aed85a3bd9a Author: John Baldwin AuthorDate: 2024-11-01 14:09:31 +0000 Commit: John Baldwin CommitDate: 2024-11-01 14:09:31 +0000 isa: Use a bus_child_deleted method to free ivars for children Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47368 --- 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 22c473108e2f..519f9353b794 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) { @@ -1058,6 +1064,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),