Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp68802pxj; Thu, 3 Jun 2021 00:46:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWPwTYV3mIV1wTTU4h3kxHAVKV5zFqrNXFbXtYYnrm2J4vzUUAAQ9LdxAYK9dT05hFSvLM X-Received: by 2002:aa7:ce96:: with SMTP id y22mr4832023edv.210.1622706415400; Thu, 03 Jun 2021 00:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622706415; cv=none; d=google.com; s=arc-20160816; b=1KbeKGlc7W1J90slQldFswMpqwf3sNvZFBEUxOF6BXhw5JhHT4zVQj5LvcrmsU5JbE Jh6SpFMD3KX0r8bKsn2w8KdlM0lLg3FSq3aSLctKw9yeF6E2jCtBc+vP0hsjXSzr8iMu xDsniDxaaauGZite/kLWzwxNpWpPj05nsBqNzdV47G2SYHi0EiwGTy6OVrwxzIU/UiPH JlsDqiV7TzsVRsEddpoHsJwGDbTRJHJqX+iFxANzDsmcLfGWuwRUwomkMVkdaNK3GafG rRoFhBEraf3Rey/Tad/3X5b8zsGNXiU9RZ2ckUr+ULdwpJEU5bJmx1gmaeht7BcqMGUx nYHg== 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=Z0TPg/CmlE0RFz77HfVGWu0xO9yklxHHFTxmnQ1Lk0I=; b=cIIMhKLYbVq8LUJCoCNrprVD1xpapSa5rjjn2AwE8HxiMe9Vz+BzEZGytMBk76aAg1 1xEVysl477tp0h9nJ1jD3Ft4ZIYU3rkH1rWOMWVphkX+0dZ6OO1z9lpJdywvE+4Fh4m5 T0HKpWLvyR94dlHdJKGfGjLaca0bCC9k/J11IzbUhuPIJbwdSqABXhpA0iPaB6pFEe/j sOn1BhuimoEF0xMcTUrUqMgV+TEG8241BK9EaRTtHTBmh32QhaXsNySw/60KrFc/5sSm 3UBcnFUQXK7fuJfuQ+OgXotQdEH/HQNQYMsteyYEW74ZP0UEyFzORs9hk3IlwMqg2Oel bQIQ== 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 v11si1886330edt.160.2021.06.03.00.46.32; Thu, 03 Jun 2021 00:46:55 -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 S229801AbhFCHqB (ORCPT + 99 others); Thu, 3 Jun 2021 03:46:01 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2973 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbhFCHqA (ORCPT ); Thu, 3 Jun 2021 03:46:00 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FwdB35MFqz6tt4; Thu, 3 Jun 2021 15:41:15 +0800 (CST) Received: from dggpeml500012.china.huawei.com (7.185.36.15) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 3 Jun 2021 15:44:14 +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, 3 Jun 2021 15:44:14 +0800 From: Kai Ye To: , , , , , , CC: , Subject: [PATCH v3 05/12] Bluetooth: 6lowpan: Use the correct print format Date: Thu, 3 Jun 2021 15:40:58 +0800 Message-ID: <1622706065-45409-6-git-send-email-yekai13@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622706065-45409-1-git-send-email-yekai13@huawei.com> References: <1622706065-45409-1-git-send-email-yekai13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) 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/6lowpan.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c index cff4944..8de7876 100644 --- a/net/bluetooth/6lowpan.c +++ b/net/bluetooth/6lowpan.c @@ -195,7 +195,7 @@ static inline struct lowpan_peer *peer_lookup_dst(struct lowpan_btle_dev *dev, rcu_read_lock(); list_for_each_entry_rcu(peer, &dev->peers, list) { - BT_DBG("dst addr %pMR dst type %d ip %pI6c", + BT_DBG("dst addr %pMR dst type %u ip %pI6c", &peer->chan->dst, peer->chan->dst_type, &peer->peer_addr); @@ -507,7 +507,7 @@ static int send_mcast_pkt(struct sk_buff *skb, struct net_device *netdev) local_skb = skb_clone(skb, GFP_ATOMIC); - BT_DBG("xmit %s to %pMR type %d IP %pI6c chan %p", + BT_DBG("xmit %s to %pMR type %u IP %pI6c chan %p", netdev->name, &pentry->chan->dst, pentry->chan->dst_type, &pentry->peer_addr, pentry->chan); @@ -550,7 +550,7 @@ static netdev_tx_t bt_xmit(struct sk_buff *skb, struct net_device *netdev) if (err) { if (lowpan_cb(skb)->chan) { - BT_DBG("xmit %s to %pMR type %d IP %pI6c chan %p", + BT_DBG("xmit %s to %pMR type %u IP %pI6c chan %p", netdev->name, &addr, addr_type, &lowpan_cb(skb)->addr, lowpan_cb(skb)->chan); err = send_pkt(lowpan_cb(skb)->chan, skb, netdev); @@ -819,7 +819,7 @@ static void chan_close_cb(struct l2cap_chan *chan) BT_DBG("dev %p removing %speer %p", dev, last ? "last " : "1 ", peer); - BT_DBG("chan %p orig refcnt %d", chan, + BT_DBG("chan %p orig refcnt %u", chan, kref_read(&chan->kref)); l2cap_chan_put(chan); @@ -943,7 +943,7 @@ static int bt_6lowpan_disconnect(struct l2cap_conn *conn, u8 dst_type) { struct lowpan_peer *peer; - BT_DBG("conn %p dst type %d", conn, dst_type); + BT_DBG("conn %p dst type %u", conn, dst_type); peer = lookup_peer(conn); if (!peer) @@ -975,7 +975,7 @@ static struct l2cap_chan *bt_6lowpan_listen(void) atomic_set(&chan->nesting, L2CAP_NESTING_PARENT); - BT_DBG("chan %p src type %d", chan, chan->src_type); + BT_DBG("chan %p src type %u", chan, chan->src_type); err = l2cap_add_psm(chan, addr, cpu_to_le16(L2CAP_PSM_IPSP)); if (err) { @@ -1016,7 +1016,7 @@ static int get_l2cap_conn(char *buf, bdaddr_t *addr, u8 *addr_type, *conn = (struct l2cap_conn *)hcon->l2cap_data; - BT_DBG("conn %p dst %pMR type %d", *conn, &hcon->dst, hcon->dst_type); + BT_DBG("conn %p dst %pMR type %u", *conn, &hcon->dst, hcon->dst_type); return 0; } @@ -1158,7 +1158,7 @@ static ssize_t lowpan_control_write(struct file *fp, return -EALREADY; } - BT_DBG("conn %p dst %pMR type %d user %d", conn, + BT_DBG("conn %p dst %pMR type %d user %u", conn, &conn->hcon->dst, conn->hcon->dst_type, addr_type); } -- 2.8.1