Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp7240ybh; Mon, 9 Mar 2020 14:57:50 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuBjJptqh43lPljRpdgi//pP+NRU4SAQ3ZTNS70/xi28UmPdncbE8kPB2mjtNsh0sWh3tbj X-Received: by 2002:a9d:4d8f:: with SMTP id u15mr14621792otk.261.1583791070000; Mon, 09 Mar 2020 14:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583791069; cv=none; d=google.com; s=arc-20160816; b=GkrnXWuxEnVLin6gZpBTZy5ZUCKJkxL88jph/uQ7aZNAB6sSbbNkr/02gdV4dnv/LC elHD6XSaQ7+d70nhSq3m7BPOKEduBlhBhR+19GhXbT1dXeZrvG7JC7FfINDsz84vHL/G tIkL6DWsZtMJJv9vIQSuffRZb1J0oorf6eiUUab/W3FdiYQnsytx3ljkXVagKfridVOP guNXBXOIVbUQHlH5HFqiN2mdWvKGewAMyN5WjWRTZ91M+usfi15eoBbqWbLc/WBb+lF6 4ul2rL4Vk0a3VjN89eGKypLAQSDtLAJT2+qapLHWFILncV+/CpOsEXyiW+th870Uxb09 FJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=rAeACqt4uYsWTc0DvMhjzkueUoUdnMj48cIS8DWtqUI=; b=rnDV/CqXtQlDd5XH9YDJSu1e+BtZT2LWcOqvi2Aq2kmO/2VlLvmmozXEOXb4tn7Q1g 7JRRvC1S1HrLDknh/EqJVhOA9GDN7zU6zmHfbP9faFNrun3knPGmntr9zJlpe+pGL1DD yiUF9NBMfgvntGxfXybvF/tuvvz/M9WhZhaoxrDM4szJjw9/GpEWeBHKlbey2gavlzUk /FG9gV0Dt7T5vVC91JPtinqGm1pLe45E+GwUSE4ABb2Dwzd33FMXQQW84USKhwEw2//O ECl5kQkW4s+SET3M2g+2hf9WzYejACblFRBb96fn8cWM/yqa2DSZG4utuUv4PEOpRJyC 2VYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h125si4347607oia.253.2020.03.09.14.57.35; Mon, 09 Mar 2020 14:57:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbgCIV53 (ORCPT + 99 others); Mon, 9 Mar 2020 17:57:29 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:52958 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726439AbgCIV53 (ORCPT ); Mon, 9 Mar 2020 17:57:29 -0400 Received: from localhost.localdomain (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 1C8E0CECC4 for ; Mon, 9 Mar 2020 23:06:56 +0100 (CET) From: Marcel Holtmann To: linux-bluetooth@vger.kernel.org Subject: [PATCH] Bluetooth: hci_h5: Switch from BT_ERR to bt_dev_err where possible Date: Mon, 9 Mar 2020 22:57:23 +0100 Message-Id: <20200309215723.442701-1-marcel@holtmann.org> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org All HCI device specific error messages shall use bt_dev_err to indicate the device name in the message. Signed-off-by: Marcel Holtmann --- drivers/bluetooth/hci_h5.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index 812a5e975ec1..106c110efe56 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -178,7 +178,7 @@ static void h5_peer_reset(struct hci_uart *hu) { struct h5 *h5 = hu->priv; - BT_ERR("Peer device has reset"); + bt_dev_err(hu->hdev, "Peer device has reset"); h5->state = H5_UNINITIALIZED; @@ -438,21 +438,21 @@ static int h5_rx_3wire_hdr(struct hci_uart *hu, unsigned char c) H5_HDR_LEN(hdr)); if (((hdr[0] + hdr[1] + hdr[2] + hdr[3]) & 0xff) != 0xff) { - BT_ERR("Invalid header checksum"); + bt_dev_err(hu->hdev, "Invalid header checksum"); h5_reset_rx(h5); return 0; } if (H5_HDR_RELIABLE(hdr) && H5_HDR_SEQ(hdr) != h5->tx_ack) { - BT_ERR("Out-of-order packet arrived (%u != %u)", - H5_HDR_SEQ(hdr), h5->tx_ack); + bt_dev_err(hu->hdev, "Out-of-order packet arrived (%u != %u)", + H5_HDR_SEQ(hdr), h5->tx_ack); h5_reset_rx(h5); return 0; } if (h5->state != H5_ACTIVE && H5_HDR_PKT_TYPE(hdr) != HCI_3WIRE_LINK_PKT) { - BT_ERR("Non-link packet received in non-active state"); + bt_dev_err(hu->hdev, "Non-link packet received in non-active state"); h5_reset_rx(h5); return 0; } @@ -475,7 +475,7 @@ static int h5_rx_pkt_start(struct hci_uart *hu, unsigned char c) h5->rx_skb = bt_skb_alloc(H5_MAX_LEN, GFP_ATOMIC); if (!h5->rx_skb) { - BT_ERR("Can't allocate mem for new packet"); + bt_dev_err(hu->hdev, "Can't allocate mem for new packet"); h5_reset_rx(h5); return -ENOMEM; } @@ -551,7 +551,7 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count) if (h5->rx_pending > 0) { if (*ptr == SLIP_DELIMITER) { - BT_ERR("Too short H5 packet"); + bt_dev_err(hu->hdev, "Too short H5 packet"); h5_reset_rx(h5); continue; } @@ -578,13 +578,13 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb) struct h5 *h5 = hu->priv; if (skb->len > 0xfff) { - BT_ERR("Packet too long (%u bytes)", skb->len); + bt_dev_err(hu->hdev, "Packet too long (%u bytes)", skb->len); kfree_skb(skb); return 0; } if (h5->state != H5_ACTIVE) { - BT_ERR("Ignoring HCI data in non-active state"); + bt_dev_err(hu->hdev, "Ignoring HCI data in non-active state"); kfree_skb(skb); return 0; } @@ -601,7 +601,7 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb) break; default: - BT_ERR("Unknown packet type %u", hci_skb_pkt_type(skb)); + bt_dev_err(hu->hdev, "Unknown packet type %u", hci_skb_pkt_type(skb)); kfree_skb(skb); break; } @@ -657,7 +657,7 @@ static struct sk_buff *h5_prepare_pkt(struct hci_uart *hu, u8 pkt_type, int i; if (!valid_packet_type(pkt_type)) { - BT_ERR("Unknown packet type %u", pkt_type); + bt_dev_err(hu->hdev, "Unknown packet type %u", pkt_type); return NULL; } @@ -734,7 +734,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu) } skb_queue_head(&h5->unrel, skb); - BT_ERR("Could not dequeue pkt because alloc_skb failed"); + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); } spin_lock_irqsave_nested(&h5->unack.lock, flags, SINGLE_DEPTH_NESTING); @@ -754,7 +754,7 @@ static struct sk_buff *h5_dequeue(struct hci_uart *hu) } skb_queue_head(&h5->rel, skb); - BT_ERR("Could not dequeue pkt because alloc_skb failed"); + bt_dev_err(hu->hdev, "Could not dequeue pkt because alloc_skb failed"); } unlock: -- 2.24.1