Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2481675rdb; Fri, 8 Dec 2023 09:17:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGYZsxKs/WUXIUJTwE3y/j8BqcWtRSwmBD1VoS7fqlrmUwuekGdZqOYgqFoUe1GPR0kZxea X-Received: by 2002:a05:651c:147:b0:2c9:f466:2f29 with SMTP id c7-20020a05651c014700b002c9f4662f29mr145857ljd.11.1702055856842; Fri, 08 Dec 2023 09:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702055856; cv=none; d=google.com; s=arc-20160816; b=v6vLKAV0rAXIXVLJCZ5uYXhec8fEdnKfRlj3YkXgtdIufTH58Jg/zBJYStoht5mmHu P7Uq17TSfGuBo7K+YzsJzuesHvWZgtpAkdaXz+JNYvAvA2pCK5Fo9dgPWU80n1nXd/xl wR0wi+NyVStoJl0C8IJtTiUCbliS1tlVYEJVm+BuKL6G0q0xBL3ALY52Q5J/d1D++P7o W+8RgD+Wb+8FxmTlLlcp7GmjIAU/epioGKvKtONdrnYWq+m30puHyexFa174hIzYW4fU JP+UdRrK+aqaB0hRp8qLP7lLe70PgBsAz46AoBRTSg+5AMNCrg8HqrY3Jb9vhIuiTfqa A0Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=FRkzBWbsrgB6T/si1igAXNIYPaIomWSnuX0TYm3WwMo=; fh=Kr3IN6esmjNREfkbiMm8bL6RvF40RecC5yDEPfmNSiw=; b=jBswFlontxgnLQt81zd0msN30ELj1vLApUw6PHR944xis5LGb4pw2fzT5tulnVl+aa 75WweCkTPw9Lp6CSTn/LFuNhNdBJ5cf9TEdQak4sCymJIyZvoK+TwYJYCdcKwPsjw2gz K/KdUnUZ1IkDm9MCDz9WF2xsffaetj/uKFyR9qrm4aBJwr+3/cshtJzaEpW678xUgHWn SNhVoz3IoER2tpq5Dyf24/Gvr3PbLxzQg/01BXo+UloBbw5JLn0cqubQAv77wnoghc2N hXXG6YRabnA+Mt7oS1/u10RkWYCPD2NhrPAFOGZWHyG+Ebh2ncOA3xb83+7kevp9FG7n v1kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VuYT4fJB; spf=pass (google.com: domain of linux-bluetooth+bounces-480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-480-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v10-20020a170906488a00b00a1d25a5c8bfsi977760ejq.449.2023.12.08.09.17.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 09:17:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VuYT4fJB; spf=pass (google.com: domain of linux-bluetooth+bounces-480-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-480-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 91E281F21179 for ; Fri, 8 Dec 2023 17:17:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C887F38FB8; Fri, 8 Dec 2023 17:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VuYT4fJB" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F7EC10F8 for ; Fri, 8 Dec 2023 09:17:26 -0800 (PST) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B8GikEO010703; Fri, 8 Dec 2023 17:17:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=FRkzBWbsrgB6T/si1igAXNIYPaIomWSnuX0TYm3WwMo=; b=VuYT4fJBe/u1s7Dm3XmWEZX66RgTkyjC7sz6zCjqkXwDeFl2JbybnBZjThDitXWsA7zB 4KUTAzS6iogmfNqF7lk0crkVd6O7EvbORQAR3N8YpsKCLAGypr9QHp15HYtytMq1NlGd UnAxIQC56JSRQJTTDFbWTAYfairNy5qsfvQ3/9cBlNx5n33ep3hYPUoUUqTtIS33XGa0 jbBKOJp0yw2OEzi2Matp7SCbPHnWoCvs5u6FYdrXYiWbnIHfA4b5pXA4yzR71imeWoYs p8thNz8vw1CpoQkFRbwaX5IMzB1YZ58c4fZk23WCAFiEkY9wMGYoGo7JMo+1jrShpwPz Lg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uv5wpg8wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 17:17:22 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B8HHLOl001037 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 8 Dec 2023 17:17:22 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.1118.40; Fri, 8 Dec 2023 09:17:20 -0800 From: Zijun Hu To: , , CC: , Subject: [PATCH v1] Bluetooth: hci_conn: Remove a redundant check for HFP offload Date: Sat, 9 Dec 2023 01:17:14 +0800 Message-ID: <1702055834-18008-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: hB3bI-LokqVT0L09Q--dTkUXOwe0uzSa X-Proofpoint-ORIG-GUID: hB3bI-LokqVT0L09Q--dTkUXOwe0uzSa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-08_11,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=827 impostorscore=0 adultscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312080143 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 a41d2693f4d8..a4c96bd202fd 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -300,13 +300,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) -- The Qualcomm Innovation Center