Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2379370lqp; Sun, 24 Mar 2024 16:47:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUv0VY+0y/7RO7atlsbohGcdh58Imldg6fEsTPdazInMPn2UKBWd/efTO7Z+tZ5+I6mIuvtC8dug7tyUW4kmsM3oPqr46E3jHcQxyfZBw== X-Google-Smtp-Source: AGHT+IHFZ1uzdMssN2HJn9VUVrErrmXuvzCSwyqeyAEKZAmy0GMM9U0OkIciR1xBnptRl0sblitS X-Received: by 2002:a05:6871:3a14:b0:229:f61d:d407 with SMTP id pu20-20020a0568713a1400b00229f61dd407mr6118479oac.21.1711324072793; Sun, 24 Mar 2024 16:47:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711324072; cv=pass; d=google.com; s=arc-20160816; b=MIonHiR/XmBiap1k2PzShpSSMAQdmWoW3BXD41oxFtn+PvFMCyrCeBofpAbMckn4SA 2xccuCzdbR6lThK3312e0xySg4JguaaL4UVp1APdQKB/bHx1UvD2k2QWBmPi2O23o+xN 2Xa/ayS7fRpe0pkb2U+Kldjp6Bb/hm6GV0ExnQ4Z5XhoxrWUBH73ia49HnP2g37RtXOm 7/Xffd28tjllRWmVC/8uzbNlZF7kU2xwC+MiXydo99O05I6MVr37GCltnBPpyNNONrtb 1ofviuEQglS48w6hYnvPajJmgX3rkSdgl3TzOj8t5fA6fqWpqaw7dHsM8+QxerAbVef6 41xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=QZ7L6IAP6k1k1S4yYepq3sTyNFwSFT34ZBwzGrbSK2E=; fh=Yq9pTZcfK+NqYz0VmPJ83nJ7o0CwDlSayUr/Cvn/Z8A=; b=THJWiHvd7RcdiVKLxeMWuUkdJxOI4nBZOd52WIgF4Tqus62Uj5AEvpUK4CS1e0cKUF 1zObwwogmOgd2/lKVpjR5eWXyjyRu7WEyHhD3TkAh/jvpl1RT5rBp4eTsrE1vt/oWCG2 2KnBZxXyH6qQHv+aQqTwER49q+pb12bZQGkOYjw1os1NsU8qOXqsqiZIguq8LduW6CPP FuzqRHE/JzlO0b0DF6MXaaJpI45h5Sj1U2lAiR1v3vcHk3TXsqm9KkCdlIYjHEKEigIP N10vTiAvJ1XngLjHPk1EeRbKqgAODT3c9u4izC4Du3I/75buwCgpYj667wnYAL/tnkKe souQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dZK1Iuhk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113195-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113195-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 190-20020a6301c7000000b005cecb6a1027si6444837pgb.702.2024.03.24.16.47.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 16:47:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113195-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dZK1Iuhk; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113195-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113195-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7F4A928C4BF for ; Sun, 24 Mar 2024 23:41:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D9C317AF80; Sun, 24 Mar 2024 22:40:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dZK1Iuhk" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35BC713119F; Sun, 24 Mar 2024 22:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319999; cv=none; b=XLiGpBXHvlnRRgBFcQ9C2giv4kc0xCjSES9y7COl21jCYHxfFlE45V0esE7yzIC/j8UGDJcKwy0R8FsR0vOXWMWyJ/w5+kas6PR3pV4/h50dfoJwABYIUmWtBcbxDB2FoIgiqTFR6zbMohCsGcRFhkgSHjzwh8fcgLfFVOZG2eU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711319999; c=relaxed/simple; bh=8/kr8B8u6KwyMHX/o0qNOYBBY6aCjmBMpsM2+5DKcnw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MW305bzCFEUHLJuK0XRocumblgrB2oHLoRf1OzF0QCSShd3m5eQLBpG/XJW9Rlzh4kjtIvBiO5DKNm1QiyUiUxfzmgs4O9eJjjfFsLDKYxs1NQja7+wF9yedTXyAVWOc0l+1WeqUvv7z5n2MI06/tprb/YxTCe3FsmnuvPOXyu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dZK1Iuhk; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 296F1C433C7; Sun, 24 Mar 2024 22:39:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711319998; bh=8/kr8B8u6KwyMHX/o0qNOYBBY6aCjmBMpsM2+5DKcnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZK1Iuhk/SXLQRR6J3B2oDp273pDInNZugbj3QvJa1ABmwBeFWbTbkCzWNEVLE5Kl gAzlIC/juLeBu3+Mqz/zW+20ZiEzrr7qyEKFSqlrnJKvvIqxORgOco9zABNyMjmHRT 3nYXBMjAwIPX75WXOce4OO3qXcYdQXAUmOxVe1UqajeEOlI129/Gc7Zcom2NmilXnF nHT1P+loJsgxgvNvaEVjQDZhGc9U7HuJdfDJBQNjE2QJw6p0D8jeFMdTyffATwSdKe tIRHDNYJe22/6/NAf8FAJvlmt/bgZX083ArOfq2todb1dEofj9Dw5h/Z+sKp/YNpKq p26WDFmPXPIjA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.8 304/715] Bluetooth: Remove superfluous call to hci_conn_check_pending() Date: Sun, 24 Mar 2024 18:28:03 -0400 Message-ID: <20240324223455.1342824-305-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jonas Dreßler [ Upstream commit 78e3639fc8031275010c3287ac548c0bc8de83b1 ] The "pending connections" feature was originally introduced with commit 4c67bc74f016 ("[Bluetooth] Support concurrent connect requests") and 6bd57416127e ("[Bluetooth] Handling pending connect attempts after inquiry") to handle controllers supporting only a single connection request at a time. Later things were extended to also cancel ongoing inquiries on connect() with commit 89e65975fea5 ("Bluetooth: Cancel Inquiry before Create Connection"). With commit a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes"), hci_conn_check_pending() was introduced as a helper to consolidate a few places where we check for pending connections (indicated by the BT_CONNECT2 flag) and then try to connect. This refactoring commit also snuck in two more calls to hci_conn_check_pending(): - One is in the failure callback of hci_cs_inquiry(), this one probably makes sense: If we send an "HCI Inquiry" command and then immediately after a "Create Connection" command, the "Create Connection" command might fail before the "HCI Inquiry" command, and then we want to retry the "Create Connection" on failure of the "HCI Inquiry". - The other added call to hci_conn_check_pending() is in the event handler for the "Remote Name" event, this seems unrelated and is possibly a copy-paste error, so remove that one. Fixes: a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes") Signed-off-by: Jonas Dreßler Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/hci_event.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 2a5f5a7d2412b..1f63f77661dce 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3556,8 +3556,6 @@ static void hci_remote_name_evt(struct hci_dev *hdev, void *data, bt_dev_dbg(hdev, "status 0x%2.2x", ev->status); - hci_conn_check_pending(hdev); - hci_dev_lock(hdev); conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); -- 2.43.0