From patchwork Wed Nov 16 20:28:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Mateusz_Jo=C5=84czyk?= X-Patchwork-Id: 13045717 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D3D6C433FE for ; Wed, 16 Nov 2022 20:29:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233959AbiKPU3c (ORCPT ); Wed, 16 Nov 2022 15:29:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231221AbiKPU3b (ORCPT ); Wed, 16 Nov 2022 15:29:31 -0500 Received: from mx-out.tlen.pl (mx-out.tlen.pl [193.222.135.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D032A199 for ; Wed, 16 Nov 2022 12:29:28 -0800 (PST) Received: (wp-smtpd smtp.tlen.pl 10810 invoked from network); 16 Nov 2022 21:29:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1668630561; bh=wIPDLnO3IoAeI00Smq/ujtO4jdLyKZdBbvJO81An0Us=; h=From:To:Cc:Subject; b=ahtEv54oe3So5cDD0xuRqhdgCPnPfel5z6Z6Z7TSlT3OpWgOs5pZnaP0cwmLk+IpW v8rF7ca+UmzuCnqMDd/b5sfRS1oZPN4igsdS2juPNG2O3dTRvt76AcqMAxtX+TaXj0 i0VZOc1q14HNBx4pVgvtqeAiiXUrZ/eJIEVwP2tk= Received: from aafn183.neoplus.adsl.tpnet.pl (HELO localhost.localdomain) (mat.jonczyk@o2.pl@[83.4.143.183]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with SMTP for ; 16 Nov 2022 21:29:21 +0100 From: =?utf-8?q?Mateusz_Jo=C5=84czyk?= To: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Mateusz_Jo=C5=84czyk?= , Brian Gix , Luiz Augusto von Dentz , Marcel Holtmann , Johan Hedberg Subject: [PATCH] Bluetooth: silence a dmesg error message in hci_request.c Date: Wed, 16 Nov 2022 21:28:56 +0100 Message-Id: <20221116202856.55847-1-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-WP-MailID: cf8b44b908658acece8b81a6ab35ced6 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 000000B [0XNk] Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On kernel 6.1-rcX, I have been getting the following dmesg error message on every boot, resume from suspend and rfkill unblock of the Bluetooth device: Bluetooth: hci0: HCI_REQ-0xfcf0 After some investigation, it turned out to be caused by commit dd50a864ffae ("Bluetooth: Delete unreferenced hci_request code") which modified hci_req_add() in net/bluetooth/hci_request.c to always print an error message when it is executed. In my case, the function was executed by msft_set_filter_enable() in net/bluetooth/msft.c, which provides support for Microsoft vendor opcodes. As explained by Brian Gix, "the error gets logged because it is using a deprecated (but still working) mechanism to issue HCI opcodes" [1]. So this is just a debugging tool to show that a deprecated function is executed. As such, it should not be included in the mainline kernel. See for example commit 771c035372a0 ("deprecate the '__deprecated' attribute warnings entirely and for good") Additionally, this error message is cryptic and the user is not able to do anything about it. [1] Link: https://lore.kernel.org/lkml/beb8dcdc3aee4c5c833aa382f35995f17e7961a1.camel@intel.com/ Fixes: dd50a864ffae ("Bluetooth: Delete unreferenced hci_request code") Signed-off-by: Mateusz Jończyk Cc: Brian Gix Cc: Luiz Augusto von Dentz Cc: Marcel Holtmann Cc: Johan Hedberg --- net/bluetooth/hci_request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 094226ad94f471a9f19e8f8e7140a09c2625abaa diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 5a0296a4352e..f7e006a36382 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -269,7 +269,7 @@ void hci_req_add_ev(struct hci_request *req, u16 opcode, u32 plen, void hci_req_add(struct hci_request *req, u16 opcode, u32 plen, const void *param) { - bt_dev_err(req->hdev, "HCI_REQ-0x%4.4x", opcode); + bt_dev_dbg(req->hdev, "HCI_REQ-0x%4.4x", opcode); hci_req_add_ev(req, opcode, plen, param, 0); }