From nobody Thu May 25 20:47:56 2023 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 4QS0W10K5Hz4CdQc; Thu, 25 May 2023 20:47:57 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QS0W06qcCz4PsG; Thu, 25 May 2023 20:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685047677; 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=hL7baf91hoVkQsaQ25i1w7xxPX2Fn/9s7KBwyxsx1AY=; b=uRuRlrpTQC3UlN7w5iuIyvDM0p9zkp6gwRQ28lsvWpc/TxNkMA4gdI8S98Kqn3MCXGWS42 qpxobX2sDY3V8yha0oLxA/Y0yOQnJwqitMZJ295x7cSznlwjfE6833/kcnEc8w4W5frIgb hOMOod1vQjIbw4hBbSw2dW4He9NJq91YoV17Pf1m2ay1ZAEc0H5YmSyBGPZpzrCH63xYYO cNJGJzMY/2jeqpbkkqWIfjCl9bOanC8bKIPFi/L7SiQhOS79GyI7BW15i7T7YH0AG9pLyA WnSQeRfw1xwhcxVRZkxqasdEOP2n5uqGAvDVaHykNZRsdBvSE1U2m4YABQVCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685047677; 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=hL7baf91hoVkQsaQ25i1w7xxPX2Fn/9s7KBwyxsx1AY=; b=FlsLXMuWggies0UldFBDrMAUv1TPLkn6aPvYHEMKsV/H50U+z5VOMURl2yvZZPTjQj51PQ topv3sXLijs76F9760NLYKHbaViM9XULy4KLtyE1j2aCeojNYHAUQsiTlU0oTzAWdCdNj/ qPSA4kdppsdU05AJfnrTVPPPGinIq8XQACC6qQ1aIHc7y4nNpP8O5zVLcKbMfU4mK75BKu 2XTgrFpWahCVZD9iaWsZHLeY7whwvSUeK0M7jHOZYwirapKA9wZDs7gvOSYdDP7sEXhJV3 FuXBPtdoCjedyf11oMdkWXdc5S+tc/oSZe2bkP743jVVLE8XZkrcTekwBSqDPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685047677; a=rsa-sha256; cv=none; b=y340Qh+bMQo6Jp8WIk3yoapMsRpyb9ms0F7sqB/ATTugok7UtKVF0iHdU45z0OdbZ9L5rh cF+58LVnTW3dm7hRJQjydgl7QQsYbkQtYQWRlofKeo7KoRHF8UySmgIPUfcI37On6f4goS 9GTqmn51OLkdBrY4PE8wZEbn3YmuZ56bZ7r9SrUC6kYqJAV9kmzus3eV3jF35eku64E8uK 6XFU5M04i+MAEQy6zwbtzSZGPA+6s9pcQLOiamLta44pH39WgRB8gVju6ZVqBEolKyCF+N 14ebdbKjfqs8ufdp+UA1/D8Y9K2StPkE9D1iGGUl8OwOOyINxGmxQ/8drPSQBQ== 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 4QS0W05rD0zfqx; Thu, 25 May 2023 20:47:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34PKluqu091549; Thu, 25 May 2023 20:47:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34PKlukX091548; Thu, 25 May 2023 20:47:56 GMT (envelope-from git) Date: Thu, 25 May 2023 20:47:56 GMT Message-Id: <202305252047.34PKlukX091548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9105ba047181 - main - ofw: remove redundant calls in ofwbus_attach() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9105ba047181a5b4a04046557d41849c92d6a787 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9105ba047181a5b4a04046557d41849c92d6a787 commit 9105ba047181a5b4a04046557d41849c92d6a787 Author: Christos Margiolis AuthorDate: 2023-05-25 20:47:41 +0000 Commit: Christos Margiolis CommitDate: 2023-05-25 20:47:41 +0000 ofw: remove redundant calls in ofwbus_attach() Since commit ecaecbc7d8bc212d8e854088106b3b21e631bb52, calling ofw_bus_gen_setup_devinfo() is redundant, as the call to device_set_ivars() now happens inside simplebus_add_device(). Reviewed by: markj Approved by: markj (mentor) Differential Revision: https://reviews.freebsd.org/D40271 --- sys/dev/ofw/ofwbus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index b35a3ce968e6..2b32d5a539c4 100644 --- a/sys/dev/ofw/ofwbus.c +++ b/sys/dev/ofw/ofwbus.c @@ -102,7 +102,6 @@ static int ofwbus_attach(device_t dev) { phandle_t node; - struct ofw_bus_devinfo obd; node = OF_peer(0); @@ -126,12 +125,9 @@ ofwbus_attach(device_t dev) /* * Now walk the OFW tree and attach top-level devices. */ - for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if (ofw_bus_gen_setup_devinfo(&obd, node) != 0) - continue; + for (node = OF_child(node); node > 0; node = OF_peer(node)) simplebus_add_device(dev, node, 0, NULL, -1, NULL); - ofw_bus_gen_destroy_devinfo(&obd); - } + return (bus_generic_attach(dev)); }