Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp943970pxj; Fri, 21 May 2021 02:51:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyamsyNS37ReXBkJ0jQne4JO5FWkIQtxh7K6THrTUGZVUdOi9Fdshk/i7kYIoCux6FF1zoR X-Received: by 2002:a17:906:590d:: with SMTP id h13mr9305601ejq.169.1621590707094; Fri, 21 May 2021 02:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621590707; cv=none; d=google.com; s=arc-20160816; b=t6+WdusQKEdf++PSoOJqJLBvOwBAUNmC4PsF4bUHGJ1R7GMwiPpdmzhNUApgwikXgW pGB+MgQ29CSmq7driiWoqaHG/kE+MSomCTb5XxZeZ+zip+Zl4LGgPq41soroBYrhwGmz iyVsU8FXWWcYRuYCyqzjLysVEjSI5Q90C/Ju7ST8oOHXeVWpMIpe/NQAsS/zwpXO7dh/ dfu6KPqRjQ1sv81OIwwHcATNu30wU+FEfteDJZOKWwW2mGZtLQkYtwLPeOtR6sV0y+Tn ZNC+C/BF5FX7E/mfW7BNRBMrR90i1iuGbkndJAjfHDCgTnNkMSKYRFLhCy7PvBYzFOUn lGhw== 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=5nOo7S+D1l+7+iMJKhsX5n64RxpTlupDgYitd7K9MQ8=; b=irAJzz1UeT7dekPrbzCea/GPWrZHgqWvZO8QUHY8lCRu4asJ7KEHaNkhP+KK1DKyZ4 Xt4MXF8CDhjfdJVAeOq7sgaA8QWMGPWz1X03Pxx1y5bQiDppw5synOuTQvuesANq2zeI CneBtykx3++FMPvKAIWysQR/1DMg1gsUIJ0nBE7AoilPkbMSJoAzy3Ap6gJZyDLj5xvy 7SXPRmaWh93DCOTsiMlQEED3IN5/zYcr1OwcJAfU+bA8ToKkM1btoKfRogRnszX7RIHl PFLgKuaJZQEXB5+CI64LG8sGIe1jr8P5QoRImZcDpk404LTC2OpMBEQmGuBQAXjrKWWz 5OsQ== 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 k1si5014648ejp.353.2021.05.21.02.51.22; Fri, 21 May 2021 02:51:47 -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 S237097AbhEUGFI (ORCPT + 99 others); Fri, 21 May 2021 02:05:08 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:3640 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbhEUGEW (ORCPT ); Fri, 21 May 2021 02:04:22 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.58]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FmbYs4YvjzmXn5; Fri, 21 May 2021 14:00:33 +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; Fri, 21 May 2021 14:02:50 +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; Fri, 21 May 2021 14:02:50 +0800 From: Kai Ye To: , , , , , , CC: , Subject: [PATCH v2 02/12] net/Bluetooth/cmtp - use the correct print format Date: Fri, 21 May 2021 13:59:38 +0800 Message-ID: <1621576788-48092-3-git-send-email-yekai13@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1621576788-48092-1-git-send-email-yekai13@huawei.com> References: <1621576788-48092-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/cmtp/capi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c index eb415560..f3bedc3 100644 --- a/net/bluetooth/cmtp/capi.c +++ b/net/bluetooth/cmtp/capi.c @@ -74,7 +74,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *sessio { struct cmtp_application *app = kzalloc(sizeof(*app), GFP_KERNEL); - BT_DBG("session %p application %p appl %d", session, app, appl); + BT_DBG("session %p application %p appl %u", session, app, appl); if (!app) return NULL; @@ -135,7 +135,7 @@ static void cmtp_send_capimsg(struct cmtp_session *session, struct sk_buff *skb) { struct cmtp_scb *scb = (void *) skb->cb; - BT_DBG("session %p skb %p len %d", session, skb, skb->len); + BT_DBG("session %p skb %p len %u", session, skb, skb->len); scb->id = -1; scb->data = (CAPIMSG_COMMAND(skb->data) == CAPI_DATA_B3); @@ -152,7 +152,7 @@ static void cmtp_send_interopmsg(struct cmtp_session *session, struct sk_buff *skb; unsigned char *s; - BT_DBG("session %p subcmd 0x%02x appl %d msgnum %d", session, subcmd, appl, msgnum); + BT_DBG("session %p subcmd 0x%02x appl %u msgnum %u", session, subcmd, appl, msgnum); skb = alloc_skb(CAPI_MSG_BASELEN + 6 + len, GFP_ATOMIC); if (!skb) { @@ -188,7 +188,7 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s __u16 appl, msgnum, func, info; __u32 controller; - BT_DBG("session %p skb %p len %d", session, skb, skb->len); + BT_DBG("session %p skb %p len %u", session, skb, skb->len); switch (CAPIMSG_SUBCOMMAND(skb->data)) { case CAPI_CONF: @@ -321,7 +321,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb) __u16 appl; __u32 contr; - BT_DBG("session %p skb %p len %d", session, skb, skb->len); + BT_DBG("session %p skb %p len %u", session, skb, skb->len); if (skb->len < CAPI_MSG_BASELEN) return; @@ -344,7 +344,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb) appl = application->appl; CAPIMSG_SETAPPID(skb->data, appl); } else { - BT_ERR("Can't find application with id %d", appl); + BT_ERR("Can't find application with id %u", appl); kfree_skb(skb); return; } @@ -385,8 +385,8 @@ static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_ unsigned char buf[8]; int err = 0, nconn, want = rp->level3cnt; - BT_DBG("ctrl %p appl %d level3cnt %d datablkcnt %d datablklen %d", - ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen); + BT_DBG("ctrl %p appl %u level3cnt %u datablkcnt %u datablklen %u", + ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen); application = cmtp_application_add(session, appl); if (!application) { @@ -450,7 +450,7 @@ static void cmtp_release_appl(struct capi_ctr *ctrl, __u16 appl) struct cmtp_session *session = ctrl->driverdata; struct cmtp_application *application; - BT_DBG("ctrl %p appl %d", ctrl, appl); + BT_DBG("ctrl %p appl %u", ctrl, appl); application = cmtp_application_get(session, CMTP_APPLID, appl); if (!application) { @@ -483,7 +483,7 @@ static u16 cmtp_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) application = cmtp_application_get(session, CMTP_APPLID, appl); if ((!application) || (application->state != BT_CONNECTED)) { - BT_ERR("Can't find application with id %d", appl); + BT_ERR("Can't find application with id %u", appl); return CAPI_ILLAPPNR; } @@ -515,7 +515,7 @@ static int cmtp_proc_show(struct seq_file *m, void *v) seq_printf(m, "ctrl %d\n", session->num); list_for_each_entry(app, &session->applications, list) { - seq_printf(m, "appl %d -> %d\n", app->appl, app->mapping); + seq_printf(m, "appl %u -> %u\n", app->appl, app->mapping); } return 0; -- 2.8.1