From nobody Sun Dec 01 04:57:46 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 4Y1F624tg6z5gDCp; Sun, 01 Dec 2024 04:57:46 +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 4Y1F622zphz4CSK; Sun, 1 Dec 2024 04:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029066; 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=Hg4xE94pnSLC/MEt8FMa+iAG8wodhfo0RS+18bcT5GY=; b=bL/6hQh8Sa6AftzIGz/jNT4nKJkOlGiCJpsce29O6Jo66TAvXciAluOdyqskOBaaOr3nGV NsOm+mmKuJveveA5V7s4mZzjQenH8/wmXw6DI/BQkks5o2Gix748ygp56zGhllE178HW5J f3VbSHeXuF6Qc2N/i08xdX+oOePxIitpDOk6CJqHpN9/xsio2VNIAu7lLm4aKgtG69QubB 6/NRi2dc6ntHJqejaQvB5/lKqwNVzyo0psc0jsVI7YuSPeL9qmKoZItKBaQ5jgkTy4IgW+ DwojYhNU98i/xc+t7imumwmd/Jlpy7+1y4ZRLCYuMz5GbBQHMqCifc1GMj9EEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029066; 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=Hg4xE94pnSLC/MEt8FMa+iAG8wodhfo0RS+18bcT5GY=; b=OyG5OJPJlqlKoWhidY3n2Gj0fH4jdhURMIKhfmVV6CFuoqV0vSFdA0R+949S166CG7/qph TdkV94UjEfbTQBstMeLDkLGjggVBoH7Lx1Db1SduvamO6oXjOVafIbcm1rUOnVOXm08R1M ieQROSrtcxcGLbLoLfvKCxUtfukSiuLkVY9CVsQpSiYkN1tgkY/XqXsrJWj9fC0n3fo+n/ jS5ogxuchsw5ITM5GInN8etcJSHiAsmbacKAwsYksS0vTtzwH6/7acUkP0123+1QZO0RN6 ElZTp6EvsK49xcMX/NJZXxDtR7mZ3tHIpg+u0wbZxefQ7tS3R+ldofGmpCBp9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029066; a=rsa-sha256; cv=none; b=V3xQ8DgZrwBLq90NrftbeegTutg67HDpAIksxLkf+S36DHLB+tOfMmGvG8qkEjUgVqbPi0 mYY7G/byuxZWkRhX1i6mWb9k8eJ/DxBUTZBeEgesjIOYL2hOOqrkPSj1Ngd9OcMhJn/9WR HB9tWB9iQz1qHvxvRYtWK5syp33lVxye4H6TE9oTFzzpU0lhdpbyE5+a3gxZnKyUyg+Fel /i3Otnc1caFvJTVQUY15WMKGS6IXNLxPjaMYXTN8c57yA8RlFammc/VoNTor025SiXNh86 O/uwFGTeH4o95ef/qa5PP6/uvHEtF0xUHmCucpH41Bvg3Bz0uYI/NxK+JX6OkA== 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 4Y1F622cTMzdwc; Sun, 1 Dec 2024 04:57:46 +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 4B14vkH1096876; Sun, 1 Dec 2024 04:57:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vkQP096873; Sun, 1 Dec 2024 04:57:46 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:46 GMT Message-Id: <202412010457.4B14vkQP096873@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: a52372fc472a - stable/13 - bus_generic_detach: Remove redundant check 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: a52372fc472a98b2dbbfd92261713abe1c5cea13 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a52372fc472a98b2dbbfd92261713abe1c5cea13 commit a52372fc472a98b2dbbfd92261713abe1c5cea13 Author: John Baldwin AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:33:38 +0000 bus_generic_detach: Remove redundant check device_detach() checks the device state and only calls a driver's DEVICE_DETACH method if the device is attached but not busy. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47156 (cherry picked from commit 3342afcbaf42c2e6a4604c84e267901411e790ca) --- sys/kern/subr_bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1f490850579e..aec5b4c615fd 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3839,9 +3839,6 @@ bus_generic_detach(device_t dev) device_t child; int error; - if (dev->state != DS_ATTACHED) - return (EBUSY); - /* * Detach children in the reverse order. * See bus_generic_suspend for details.