Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp74510pxj; Thu, 20 May 2021 04:55:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxiUhzP8XLcVTrBzcWWoz0d5nc+P2ZhtpbdhYLCyvT52ZGFh4r9P4PSZSfoCP11ASPmNnl X-Received: by 2002:aa7:d455:: with SMTP id q21mr4552822edr.2.1621511719961; Thu, 20 May 2021 04:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621511719; cv=none; d=google.com; s=arc-20160816; b=lFIODF23o3JZF5+9ALatXl2wip2IXYLdyNqbI2fE6lhRyn14Ex417vGBVW0ep+1kn2 YpfwnOxrZTtpc/xKIuLXgbX8NwOZIyDfAVkTuM4NlPCzqg7xaHWHSPIX2Xt33biOBCqM TDd8SqXdWUqpfEhovA288UyyUr08M+4LVLF41UBIJYEORpenkoqUxUvZ7doFvOA7sSbb 4/2AIGGeKRbtRGxQjzfuFOXnUncVl2FEFtdyGuf7Fc8KWbpwLRlb504lWyzZofPGIyTZ piqqWcC0pYU3Kb7WB62IcUTgWopn9HiHfEJlXuIfX8xDeT4pex0kRatJwnqp1/2Imrnr ffZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=EyQD20AiPfWFpkCpG++MBQbegOGacKT6LFXQwZKaPyk=; b=gLs+VKMucG1zlGO+e36tacjUt8ju/sxyQZxYeLE7FgUKqWc7XHqPptWbVn7Xpye79L +63CoCHLdR+SLp5r8rWyYFrTjXr7EpVHLF1ZxOiQ0pf4yTigEhvMv3bTN20EoIXcfGwx JEitCJ+3/hYdalRU7A3eRzJa+2tBeslXg3cq9DZXhXSszOj75bko0T8OCP3oZDg+zWqo 5bfvlSX1YivCxmYkPtwGNKapIDfZT6Y5vFst3yIjQ9vJfQrjtwryEQvqb9nDWj0aoe9f Vtmc7f2DaKhFdjJx38Wt+wffbkHYkX6GaL//RwmhOqBKkbIbeMvFVCEhNgBz2RpVmb7E O6dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r3si2403047ejs.480.2021.05.20.04.54.56; Thu, 20 May 2021 04:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243336AbhETLxy (ORCPT + 99 others); Thu, 20 May 2021 07:53:54 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3445 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241399AbhETLtA (ORCPT ); Thu, 20 May 2021 07:49:00 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Fm7FX21yszBv3f; Thu, 20 May 2021 19:44:48 +0800 (CST) Received: from dggpeml500012.china.huawei.com (7.185.36.15) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 20 May 2021 19:47:35 +0800 Received: from huawei.com (10.67.165.24) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 20 May 2021 19:47:35 +0800 From: Kai Ye To: , , , , , , CC: , Subject: [PATCH 12/12] net/Bluetooth/smp - use the correct print format Date: Thu, 20 May 2021 19:44:33 +0800 Message-ID: <1621511073-47766-13-git-send-email-yekai13@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1621511073-47766-1-git-send-email-yekai13@huawei.com> References: <1621511073-47766-1-git-send-email-yekai13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Otherwise printk() might end up displaying negative numbers. Signed-off-by: Kai Ye --- net/bluetooth/smp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 2def906..56c59f8 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -859,7 +859,7 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, memset(smp->tk, 0, sizeof(smp->tk)); clear_bit(SMP_FLAG_TK_VALID, &smp->flags); - bt_dev_dbg(hcon->hdev, "auth:%d lcl:%d rem:%d", auth, local_io, + bt_dev_dbg(hcon->hdev, "auth:%u lcl:%u rem:%u", auth, local_io, remote_io); /* If neither side wants MITM, either "just" confirm an incoming @@ -925,7 +925,7 @@ static int tk_request(struct l2cap_conn *conn, u8 remote_oob, u8 auth, get_random_bytes(&passkey, sizeof(passkey)); passkey %= 1000000; put_unaligned_le32(passkey, smp->tk); - bt_dev_dbg(hcon->hdev, "PassKey: %d", passkey); + bt_dev_dbg(hcon->hdev, "PassKey: %u", passkey); set_bit(SMP_FLAG_TK_VALID, &smp->flags); } @@ -1654,7 +1654,7 @@ int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey) case MGMT_OP_USER_PASSKEY_REPLY: value = le32_to_cpu(passkey); memset(smp->tk, 0, sizeof(smp->tk)); - bt_dev_dbg(conn->hcon->hdev, "PassKey: %d", value); + bt_dev_dbg(conn->hcon->hdev, "PassKey: %u", value); put_unaligned_le32(value, smp->tk); fallthrough; case MGMT_OP_USER_CONFIRM_REPLY: -- 2.8.1