Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2322728lqt; Mon, 22 Apr 2024 07:47:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDJgtrZNRnsldKG8wrEgadNfB540JG8hvq9elOdq5O03Be7mIX5fxnzEanIp4BJcdu+Is/7Q3QUWWVOLXhJJVMZz0iE4/0hW2yHN/Mzw== X-Google-Smtp-Source: AGHT+IGDgMy5C3ZgpsJuvBdAi4p/JYPfTD4u4bP4+3tklLPK9C8V48NT7QYcxnC4hQx2YpWxeM3U X-Received: by 2002:a05:6a20:da81:b0:1aa:5e21:17b1 with SMTP id iy1-20020a056a20da8100b001aa5e2117b1mr10705564pzb.11.1713797225461; Mon, 22 Apr 2024 07:47:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713797225; cv=pass; d=google.com; s=arc-20160816; b=a1xsQYsZRcQts9gV8DjtCKxX/Yfr3k/vigmlFjoB9pL6w1sNw1787UqrYBTLC2UYhk QhpJrbW88XxyKKzCaw2NkYXR1nwakxEKgycqRjX1nMlYSPIrB1MZ1oxS47LPoWg3Kil+ Zafu9FE5p6j7f/Ym9AWv7m55hjTLt+LJk/JAqID1wNUzbxOrCLPzTizHjPt2o2kH//fF tf0/70hsbh6MCwyrPpNNK1il82ZlICOElXbz+xW8CFu8+fEbUi42T63fkIk6pRiQQKZN ZUCOjP7/OTfK9D6a5leRdByI+1NTIrqtrC0G241p3t+SycweqaODk1GPqo2DuN0KPNwl Ixtg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=K+1YUbaVDaDBVEOYT6Anp5fKNz0crd+O4/59bS+O2lw=; fh=81a5nS52RMebsrFFmg72GeQQwq1a1e8kDcjIaVsTAYE=; b=yJBDx7bye8HixV8UJ14oKSgSAjJ32x8j+mpRd/chuxlH9vpUcAejca/hM69sLa+Gol vdpd2kU/BxdGd3N80aRaPLCB16JrCSRuGt1TXQ5HPdhr40eIm+aR0JBGgPLhWUj9x921 H1XoJOAKpp600FKhcRNYXdSeAsgKM3A3ywy2fTi4OLioOfH71Jitvm560wGFmIb74DoH NceYHUUqjjkU11wRRONxh74pTDaMHj5rp+HsGiK4GGF4q/CiWx8lAfi5iIl3eZez4pOk WYuKDnxCdKv74mSZhRd4s/hmirOrSCCwguhmo68D/dqdKKbuKNaja4sTbMgSx1xDZmg8 uTHA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Oe5hHddZ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id f12-20020a056a00238c00b006e6bcbccd85si8095504pfc.22.2024.04.22.07.47.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 07:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-3876-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=@quicinc.com header.s=qcppdkim1 header.b=Oe5hHddZ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-3876-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-3876-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 C9F53283889 for ; Mon, 22 Apr 2024 14:47:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43DCE152172; Mon, 22 Apr 2024 14:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Oe5hHddZ" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 3A1C21514F5 for ; Mon, 22 Apr 2024 14:46:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713797207; cv=none; b=adjKYgpUIVPgLrOM7fxyNqAXoEPj3mk5KYjhZso2fiSxnUf928DJyumHe15jC2vuW9ouI0mGnTMHbuNFJCv2ovB7RRH9zJCqUuyx0f0WL7+QtYReplKgrVvZ5xTgCAB/da+ZrWviMCpnyrOc/US/OvyjoPi86RCDnqhvUpIYF48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713797207; c=relaxed/simple; bh=0ezOc/bmC7SCaHcb+Kag0R04QTvsUPl0q6Rgb8FFqmA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XYLHp+ThhVK15w0EG9bLQazwie+MTFCJKgtmM6P09kTZYmQEtGRbekYpxv8C73qS7Ef2DxnrSSLoyfZA9DxUwWyMEzH5OggRhh2kreeFvHqWDDpe9VKCYx77a1HfKuljZg88QaffuTIlUwTaKhH9PNC6lOCmsRzpwDuGiFEJQJo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Oe5hHddZ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43MC0CjO006338; Mon, 22 Apr 2024 14:46:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=K+1YUbaVDaDBVEOYT6An p5fKNz0crd+O4/59bS+O2lw=; b=Oe5hHddZb/nFw0bQi+wplmJmHC/5XZUkTONJ X6iyGq9Z9jREBu55nNo2cKaOQu2+j9Y32zf34H0Kxo8GIy6WtFOMFAs2Ro64ogU3 CX7iDLjL4crNvINs2DaT3Co0pCaTajH3hWYy/i5dFIvTgZCBzZ+QotF82AUNIGhe qa1w8VzrWj92VFW47cdF+tyxO78jWUDdQO+Ftj1FdYLH/ghrLIFzDKfIxmxzqgEV o9TSfDFF0FA+V1uWCMwWYauWoTtiVnn9EusDd7YmbwkBRU3T4tt0jG61QTYL6N2z 7kMsgVQ/5Ycny+1nt+aAWmXO7cI7fKqmuQz+oi6s12NYk1q6gw== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xmxq4tscn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 14:46:40 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43MEkd84012746 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Apr 2024 14:46:39 GMT Received: from zijuhu-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 22 Apr 2024 07:46:37 -0700 From: Zijun Hu To: , , CC: , Subject: [PATCH v1 RESEND] Bluetooth: hci_conn: Remove a redundant check for HFP offload Date: Mon, 22 Apr 2024 22:46:34 +0800 Message-ID: <1713797194-22982-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1702055834-18008-1-git-send-email-quic_zijuhu@quicinc.com> References: <1702055834-18008-1-git-send-email-quic_zijuhu@quicinc.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: qZkzayK5ZwhrSvZ1frtluUaWufWBTa_i X-Proofpoint-ORIG-GUID: qZkzayK5ZwhrSvZ1frtluUaWufWBTa_i X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-22_09,2024-04-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 clxscore=1015 suspectscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404220064 Remove a redundant check !hdev->get_codec_config_data. Signed-off-by: Zijun Hu --- net/bluetooth/hci_conn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index a3b226255eb9..81166a5bc034 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -242,13 +242,13 @@ static int configure_datapath_sync(struct hci_dev *hdev, struct bt_codec *codec) __u8 vnd_len, *vnd_data = NULL; struct hci_op_configure_data_path *cmd = NULL; + /* Do not take below 2 checks as error since the 1st means user do not + * want to use HFP offload mode and the 2nd means the vendor controller + * do not need to send below HCI command for offload mode. + */ if (!codec->data_path || !hdev->get_codec_config_data) return 0; - /* Do not take me as error */ - if (!hdev->get_codec_config_data) - return 0; - err = hdev->get_codec_config_data(hdev, ESCO_LINK, codec, &vnd_len, &vnd_data); if (err < 0) -- 2.7.4