From nobody Sun Dec 01 04:56:56 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 4Y1F546Ywtz5gD5X; Sun, 01 Dec 2024 04:56:56 +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 4Y1F542sq2z48Gm; Sun, 1 Dec 2024 04:56:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029016; 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=u1PLmPcd1S+dDmB5BER3QxqsvbXRVAG1hopaTrnPRLo=; b=fEyGrxnzCCkEpBzRaKmos4gB6cQP4Y2ZM82FJ+jy99unCMDp3oD+sHvEpOJGb7/7VJ85H+ yM02lTpRAiBQrUQd8dDIowlQRkejWjcLnagDtV9INAS4XtX4xwTOtkoq+RkzDf+bJqu6uj EQrK0FKUa0Jkz8qSsIse3GlQQPURUOCHJrKO9dViKwSTt77d4co+qZu28FhJCSVGA9pE39 KFzeh77ODlQVjN2eHRepPYydAjtmTilBRjpzcD5FGDpEO7lY0DHwH/KmVZEbO+kjV8H+Fl DZujRLxFowTRM08koOKtW6bk4j9+GIF4OUSVxvI2i6Zng5jF+8NF02/U5qpusQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029016; 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=u1PLmPcd1S+dDmB5BER3QxqsvbXRVAG1hopaTrnPRLo=; b=PSNLYzULBUd0oR0Rtq5EFnaVyzmLr8ecUjJ4Ifd33iQ+XiHx/6Bo7Olz96amjb6Xe4+tVq kYY9B5YFVoa3+6Rmo9o5q7qmzkfCEbOzq9/5EZXqt0M4RlpHYzoVwSn3CgMEI8W7IvBaV/ D7Zlm4XxnSsEBEPJHqbOgjchJs67BHv99JvyrXmGRpqtztMHj9o03By2Y39ssq58/wqJ2l ZJcVCxekwVaSbIFaUHBaYc8h37T+et6iTwStilk8+7gRZPJsemeC5Sy1fDGHaEU00NcbJu fu1vYnnHTDiXDev7Ye4qx121uKMkN95xHihZtasyYHIeXuGIU9dH/urEb+pyng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029016; a=rsa-sha256; cv=none; b=dj3n4g6xrdKmSx/s3X7AmhyJKnkVVFCQCCs7HFpEjOoUTisiBz0vMwMb5A9m6qNWz/+bdU 73RYAt+m7tbtfy7/0eMYbghhGnlUPajshAtwyprlNGl1LlixBCZhWAnmfyjEBUdaPe7M6R vYPQRpRy0EiaOOiyr0i/k8WNbZ/fvBbpuwxVIOgpELGhqM7UXvqI9sZHBDcgmn5y7eCIvf 4aFLKOUyZFyUVLa2f3vq2hK/HPyC7StXYNdxHUnnMSvK7v6oNTFldz/hEuFd51xWb9UtL2 AIPsaQqiaNpNW9sWKo3fivfS6JpKmkELanPC1xBu2iRiMgTFl9t5uyavujFS/g== 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 4Y1F542PtBzdxg; Sun, 1 Dec 2024 04:56:56 +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 4B14uurT094496; Sun, 1 Dec 2024 04:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uuOs094493; Sun, 1 Dec 2024 04:56:56 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:56 GMT Message-Id: <202412010456.4B14uuOs094493@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: 4e3ad581b5dc - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 commit 4e3ad581b5dc350dfc7b0d311c06fa2a489a3d20 Author: John Baldwin AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +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 d271013b4b1f..d22dd4868ff6 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3465,9 +3465,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.