Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3852388rdg; Wed, 18 Oct 2023 07:53:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMfDxHYmyO3oHybxUu/CbcBcyPFQQ2iY7TIfJOqm+87y32LFVcFKTMOAgfiFhNbjZXJ6LJ X-Received: by 2002:a05:6a00:1a94:b0:68b:bf33:2957 with SMTP id e20-20020a056a001a9400b0068bbf332957mr5131336pfv.22.1697640798203; Wed, 18 Oct 2023 07:53:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697640798; cv=none; d=google.com; s=arc-20160816; b=cXgMvYH6OpYBDfL1u1bxyxZcYo1Vy+2Rv9jT2/6dErSchuEDlMAFwMEu19Se7ayRxh Dosj3MEodg5jdrtOJgBM0KeaNJwOFoXRzvUV7ITAl+ygS1E4NU1YPrPrfQk8oLmubQyk aoJnv+eXTqNOnR2ojZvQcc/9kHKWLk6F8ewbGdUo+M3mDxq8sbKwfxHykOUUD/5RgKNi zeGXeBHEVsiP9NI9h/0KJj+MpBwXPbpDvaCut0g1zJqzEDKHYH7k0vaRtD4mkg/y3xox Ge5LSmTEORtwY7vDCCU6tq30xmTUnVwdS01hFiTwpt4cSkr68UDAPO/RKh4TRwZgHXCr Neog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=wh3IMLTEQQ8Hmtd/m/WvnzYmGIzCIk5eUcGUgGTaEqU=; fh=wLmzBWsGqSwA4nKwAHHseDyE5GSADmCzryYDfWigo20=; b=SYR8sGSjv8C4jAkZzMb6LoA7PqkWpXp76O2VzolC+HfWcPmZq3JbnQ5igwRCLo930Y lM6qFm78HGZqX8ZaljP7W/6iN7lPX8iChdF19cDfrCwN/MGXcQA5IDiBC/E0HL26Y4ps DuUanl8Fs69nKCgDHQWSCDwnNDEPIDe7Fijh7FgyfIaZLLwvtSi0hbUw95l/0ee5QSFO QDmp7P+tPPdvw50Pc7GVCU2enCK2fH41CeRNMTOstAnuTd5mhmk5R0pVJK81fil2ktyx kZ/hpWo70Obzsh5GrXSpbUiiM9Ufg01yQkLY8DSPNpjQiS9qFoJAph0fOcFs/XScute/ +pNQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b0057806be7290si2278130pgb.451.2023.10.18.07.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 07:53:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 0E8528029368; Wed, 18 Oct 2023 07:53:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbjJROxF (ORCPT + 99 others); Wed, 18 Oct 2023 10:53:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344854AbjJROxE (ORCPT ); Wed, 18 Oct 2023 10:53:04 -0400 X-Greylist: delayed 306 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 18 Oct 2023 07:52:57 PDT Received: from mout.perfora.net (mout.perfora.net [74.208.4.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A20FA4; Wed, 18 Oct 2023 07:52:57 -0700 (PDT) Received: from toolbox.int.toradex.com ([213.66.31.70]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MWlJt-1r3Bwb0IDD-00XwKn; Wed, 18 Oct 2023 16:47:42 +0200 From: Marcel Ziswiler To: linux-bluetooth@vger.kernel.org Cc: Marcel Holtmann , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, Johan Hedberg , Marcel Ziswiler Subject: [PATCH] Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err Date: Wed, 18 Oct 2023 16:47:35 +0200 Message-Id: <20231018144735.33085-1-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:D/nAGp1wCpmkVnmgPEaC7LIjFl5TsnT5zxaMTY7Ho76ZvHh5B9H PBN2aThukCNj0v4Vv/l5nvpg7CM4n+Q2dJ4OsgK89xUeRL/2XmbCfn5+LW8V2OPyhl6OA9D KJkUn0e4sr5gr71l/55+u1z3vrgj+Ze7AjkEWyDx8nXxz4nmQyNlno7VciuRJ5MQt/PDHQj 50S3iQtmjL6hb8szMuIEw== UI-OutboundReport: notjunk:1;M01:P0:i37tXkAfYkU=;H5zXuRURrCGlWwYeSx0YbqMTSod Qgv6ir+k0/lTpHWMGiHA8zZvxkDTj/GrwcGQG/l4MuOdM+nvQEgdrHwFJcAXAGdrdil2PDZD4 hKenvAlpTY8e0x5rtGb8j1zgW5sPfwfPoQx+j0WVlIp4cWgtmCtQHhVdw76XmERfY2LGMG/I9 3NEql875tGwLCxxXt3GojURPFxxh6yHv0vJ3Yi7cT3k0784UPxihUWrE1FglCD8M+QogGGGR2 FU3WtrSRnhPEs5MwKPfkaJ0OzwDxhF1DeCA+Wy3Yf6Ky1mSjbjbYI90aCfxo4P3x8g0ZYHLdX aYV2iVp1LG84XDZXgXN8hDrVVKGsiqJ05naJ6IfVw5fCPDKj+gG8VqHiU9Ke/yxCjbIhhE+TF qJmYXNMI+kli57LLGPYn1jKrSQtqQpHnkF1y/n/NgFTq2VWWE3XvAC+ukklokQ9X/DHj2k8K9 1zoLp94oEHN5nYil7ZEepSr/3oDMUpMctHgHqltPprotbpAqxx4Xji1gAURB+hStmgylqqJLK MSgPj4ZcAcFo0PywUmvEklBr810sJ71QcmnRjhMPXY65iRSjxxNmtUtu6nM6tdA/YDEDWnIoF HAZ66SNdx8QIKsI7ydICEtQzpSY6IrGksJQyxk3H9iBNbol/Fmce6bC/LxK/AYfGR5nMYhXoK Ad49AhUcRfWee6wi1dESSdnfR/uemwlxugv8DvEREKlg25/5BSEM6gDZWH9cfRz7NLuFelyPZ F2Hhk+PVtj68uT9opZ8vRsr7pUYhQ7nL73ZYwHkNtyXzKJkiynzqgYgRWQtdDJJlm8BXVCSWU 8QMLoOOAR9zMNB2tYwvVfmixmrl6u4mRYr/ke5N7Yb+3KGsyf9Q8Mu7oZAtey0na9M4LDzwpQ I4S6/DtgoSaE7MA== X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 07:53:07 -0700 (PDT) From: Marcel Ziswiler Printed Opcodes may be missing leading zeros: Bluetooth: hci0: Opcode 0x c03 failed: -110 Fix this by always printing leading zeros: Bluetooth: hci0: Opcode 0x0c03 failed: -110 Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages") Fixes: 6a98e3836fa2 ("Bluetooth: Add helper for serialized HCI command execution") Signed-off-by: Marcel Ziswiler --- net/bluetooth/hci_sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index d06e07a0ea5a..2c782b6a274d 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -152,7 +152,7 @@ struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen, struct sk_buff *skb; int err = 0; - bt_dev_dbg(hdev, "Opcode 0x%4x", opcode); + bt_dev_dbg(hdev, "Opcode 0x%4.4x", opcode); hci_req_init(&req, hdev); @@ -248,7 +248,7 @@ int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen, skb = __hci_cmd_sync_sk(hdev, opcode, plen, param, event, timeout, sk); if (IS_ERR(skb)) { if (!event) - bt_dev_err(hdev, "Opcode 0x%4x failed: %ld", opcode, + bt_dev_err(hdev, "Opcode 0x%4.4x failed: %ld", opcode, PTR_ERR(skb)); return PTR_ERR(skb); } -- 2.36.1